Created
April 19, 2018 06:25
-
-
Save andreasohlund/abda1bd52a9e40725198c15f6be377db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ASQ expects to see a
MessageWraper
. The message you're sending is notMessageWrapper
I presume. So how does it work?...