Last active
December 1, 2020 23:29
-
-
Save Pompeu/ce58d61cde1e51a1da164404d667d458 to your computer and use it in GitHub Desktop.
cpf_consulta_api_sus.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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))); | |
}); |
A casa caiu negada!
O cara faz um GET lá e o safado faz um redirect, já era 😢
Realmente, serviço caiu :(
culpa do @suissa... 😂
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@suissa sai dessa vida de lisp cara que tanto de pareteses é esse KKKKK, sussa Xd