Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ajaxNode
var http = require('http');
var server = http.createServer(function (request, response) {
function funcOne(input) {
var request = require('request');
request.get('http://estruturaorganizacional.dados.gov.br/id/unidade-organizacional/1930',
{json: true, body: input},
function(err, res, body) {
if (!err && res.statusCode === 200) {
console.log(err);
console.log(res);
console.log(body);
}
});
}
funcOne();
});
server.listen(8000);
console.log("Server running at http://127.0.0.1:8000/");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.