Created
August 1, 2017 18:57
-
-
Save jasp402/bfa66e54d44824c6574400b510c556d1 to your computer and use it in GitHub Desktop.
JS - Bot's (Sending data to server using Sync-request)
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
// Seding data through sync-request | |
// ======================================================================== | |
let sendServer = request('POST', key.serverUrl, | |
{ | |
headers: {'content-type': 'application/x-www-form-urlencoded'}, | |
body : 'username=' + key.username + '&password=' + key.password + '&botName=cigna&request=save&data='+objsToServer | |
}); | |
let responseBody = sendServer.getBody(); | |
console.log(responseBody.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment