Created
March 9, 2018 12:07
-
-
Save mogwai/a6db5cff290ff75cb08d27e0393fc2f3 to your computer and use it in GitHub Desktop.
Sending a HTTPS 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
const request = require('request') | |
const url = "https://sad-poincare-i76vm5gt.vertuozpilot.engie.fr/hemis/rest/WS_UserManagement/login" | |
const options = { | |
url: url, | |
headers: { | |
"Content-Type": "application/x-www-form-urlencoded", | |
"Cache-Control": "no-cache", | |
"Postman-Token": "314a0757-450b-7889-8c2f-9ca33b3c72a5" | |
}, | |
formData: { | |
'email': '[email protected]', | |
'password': '4a9f85d4-0acf-4d3b-b282-87b2330925ee' | |
} | |
}; | |
request.post(options, (err, res, bod) => { | |
console.log(JSON.parse(bod)) | |
console.log(err) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment