Skip to content

Instantly share code, notes, and snippets.

@benhartley
Created March 19, 2015 16:40
Show Gist options
  • Save benhartley/bc8be0737a4aa952b767 to your computer and use it in GitHub Desktop.
Save benhartley/bc8be0737a4aa952b767 to your computer and use it in GitHub Desktop.
var request = require('request');
var path = require('path');
var fs = require('fs');
var requestOptions = {
url: 'https://curation.test.api.bbci.co.uk/collections?about=31684f19-84d6-41f6-b033-7ae08098572a',
agentOptions: {
pfx: fs.readFileSync(path.resolve('./dist/server/certificates/bbc.cert.p12')),
passphrase: require('./certificates/passphrase')
}
};
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
request(requestOptions)
.on('response', function(response) {
return console.dir(response.toJSON());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment