Skip to content

Instantly share code, notes, and snippets.

@anthonybudd
Created July 24, 2018 10:10
Show Gist options
  • Save anthonybudd/b9ee8a95839b141f9bece1c0fc462160 to your computer and use it in GitHub Desktop.
Save anthonybudd/b9ee8a95839b141f9bece1c0fc462160 to your computer and use it in GitHub Desktop.
axios({
url: 'localhost:7777/api/v1/channel/1/messages',
method: 'post',
data: {
message_id: '2kkun2k98fkxhfu8sf2444',
message: 'echo',
type: 'text',
channel: 'presence-lexi-2',
channel_id: 1
},
}).then(function (response) {
if (typeof onSuccess === 'function') onSuccess(err)
})
.catch(function (err) {
if (typeof onFailure === 'function') onFailure(err)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment