Skip to content

Instantly share code, notes, and snippets.

@ccondry
Created February 1, 2021 20:34
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 ccondry/bfcfa3bc284d72dd280afbc78044791a to your computer and use it in GitHub Desktop.
Save ccondry/bfcfa3bc284d72dd280afbc78044791a to your computer and use it in GitHub Desktop.
disable SSL cert checking for 1 request
const fetch = require('node-fetch');
const https = require('https');
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
});
const response = await fetch(url, {
method: 'POST',
headers: headers,
body: body,
agent: httpsAgent,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment