Skip to content

Instantly share code, notes, and snippets.

@vyo
Last active March 14, 2016 21:25
Show Gist options
  • Save vyo/b1fe1abc6a780ae6a120 to your computer and use it in GitHub Desktop.
Save vyo/b1fe1abc6a780ae6a120 to your computer and use it in GitHub Desktop.
short request promise test
'use strict';
const RequestPromise = require('request-promise');
RequestPromise( {
uri: 'https://google.com',
method: 'HEAD',
resolveWithFullResponse: true,
simple: false
})
.then( (response) => {
console.log(response.statusCode);
})
.catch( (error) => {
console.log(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment