Skip to content

Instantly share code, notes, and snippets.

@revolunet
Created October 7, 2022 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revolunet/10b520b49ba922114c5fdeba34c4e8bd to your computer and use it in GitHub Desktop.
Save revolunet/10b520b49ba922114c5fdeba34c4e8bd to your computer and use it in GitHub Desktop.
sample NodeJS fetch
const fetch = require("node-fetch");
fetch("https://api.insee.fr/entreprises/sirene/V3/siren?q=michelin", {
method: "POST",
headers: {
Accept: "application/json"
}
}).then(response => responses.json()).then(payload => {
console.log(payload);
}).catch(error => {
console.error(error);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment