Last active
July 3, 2020 13:40
-
-
Save shivasurya/685467bcde68ec7b092690a4138d678b 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
var axios = require('axios'); | |
var qs = require('qs'); | |
var data = qs.stringify({ | |
'jsonString': '{\n "email" : "[email protected]",\n "role" : "admin",\n "first_name" : "Srirama Moorthy",\n "last_name":"Srm"\n}' | |
}); | |
var config = { | |
method: 'post', | |
url: 'https://api.goschedule.io/users/inviteuser', | |
headers: { | |
'X-API-KEY': 'gsid=s%3ADbdXXXXXXXXXXXXXXXXXXXXXXYI5y3kNGxyXcVQqFdHR%2FmAdCh1cM4j1JtcEANILrV2w;', | |
'X-ORGANIZATION-ID': '449', | |
'Content-Type': 'application/x-www-form-urlencoded' | |
}, | |
data : data | |
}; | |
axios(config) | |
.then(function (response) { | |
console.log(JSON.stringify(response.data)); | |
}) | |
.catch(function (error) { | |
console.log(error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment