Skip to content

Instantly share code, notes, and snippets.

@Carlos-Augusto
Last active October 31, 2021 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Carlos-Augusto/66c6fc93b6a8bc4bcfc82bcb4649cc11 to your computer and use it in GitHub Desktop.
Save Carlos-Augusto/66c6fc93b6a8bc4bcfc82bcb4649cc11 to your computer and use it in GitHub Desktop.
'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