Skip to content

Instantly share code, notes, and snippets.

@Pompeu
Last active December 1, 2020 23:29
Show Gist options
  • Save Pompeu/ce58d61cde1e51a1da164404d667d458 to your computer and use it in GitHub Desktop.
Save Pompeu/ce58d61cde1e51a1da164404d667d458 to your computer and use it in GitHub Desktop.
cpf_consulta_api_sus.js
'use strict';
// @deprecade
const http = require('http');
const cpf = process.argv[2];
const parse = JSON.parse;
const log = console.log;
const url = `http://dabsistemas.saude.gov.br/sistemas/sadab/js/buscar_cpf_dbpessoa.json.php?cpf=${cpf}`;
http.get(url, res => {
let body = '';
res
.on('data', data => body += data)
.on('end', () => log(parse(body)));
});
@netojose
Copy link

netojose commented Dec 6, 2016

A casa caiu negada!

O cara faz um GET lá e o safado faz um redirect, já era 😢

@pierrybos
Copy link

Realmente, serviço caiu :(

@lagden
Copy link

lagden commented Dec 15, 2016

culpa do @suissa... 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment