Last active
October 31, 2021 06:35
-
-
Save Carlos-Augusto/66c6fc93b6a8bc4bcfc82bcb4649cc11 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
'use strict'; | |
const request = require('request'); | |
const fs = require('fs'); | |
const pfx_file = fs.readFileSync(__dirname + "/PFX_FILE.pfx"); | |
const options = { | |
method: 'POST', | |
url: 'https://api.uve.demo.ubirch.com/api/uve/v1/verify', | |
headers: { | |
"content-type": "application/json", | |
"X-Transaction-Id": "1234", | |
}, | |
agentOptions: { | |
pfx: pfx_file, | |
passphrase: "PFX_PASS", | |
}, | |
body: "HC1:XXXXX" | |
}; | |
request(options, (error, response, body) => { | |
console.log(error, "Errors"); | |
console.log(response, "Response"); | |
console.log(body, "Body"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment