Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created September 29, 2014 18:54
Show Gist options
  • Select an option

  • Save alanhoff/4aae4663478af454a5f1 to your computer and use it in GitHub Desktop.

Select an option

Save alanhoff/4aae4663478af454a5f1 to your computer and use it in GitHub Desktop.
request.js com proxy
var request = require('request');
var options = {
url: 'https://portaldocidadao.saude.gov.br/portalcidadao/validaNumeroCNS.htm',
proxy: 'http://huehuebr.com.br'
};
request(options, function (err, res, body) {
if(err)
throw err;
console.log('Página retornou com status %s', res.statusCode);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment