Created
August 9, 2017 15:25
-
-
Save nwhatt/deb6d99b012a6ec9fe4a7b831436219b to your computer and use it in GitHub Desktop.
Client Certificate API 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
var request = require('request'); | |
var fs = require('fs'); | |
var key = fs.readFileSync(__dirname + '/ssl/server.key'); | |
var cert = fs.readFileSync(__dirname + '/ssl/server.cert'); | |
request.post({ | |
uri: 'https://api.redoxengine.com/auth/authenticate', | |
cert: cert, | |
key: key, | |
body: { | |
apiKey: '', | |
secret: '', | |
}, | |
headers: { | |
'Content-Type': 'application/json' | |
}, | |
json: true | |
}, function (err, response, body) { | |
console.log('statuscode\n', response.statusCode, 'body\n', body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment