Skip to content

Instantly share code, notes, and snippets.

@andreasohlund
Created April 19, 2018 06:25
Show Gist options
  • Save andreasohlund/abda1bd52a9e40725198c15f6be377db to your computer and use it in GitHub Desktop.
Save andreasohlund/abda1bd52a9e40725198c15f6be377db to your computer and use it in GitHub Desktop.
//this is called to push messages onto ASQ from the browser
sendMessage(queueKey, message) {
let json = this.orderedJsonStringify(message);
let encodedMessage = btoa(json);
let url = this.tokens[queueKey]; //this is the url for the queue including SAS token for auth. This is stored in a JWT token created at login
this.fetch(url,
{
method: 'post',
body: `<QueueMessage><MessageText>${encodedMessage}</MessageText></QueueMessage>`
})
.then(response => console.log("ok"))
}
@SeanFeldman
Copy link

ASQ expects to see a MessageWraper. The message you're sending is not MessageWrapper I presume. So how does it work?...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment