Created
February 1, 2021 20:34
-
-
Save ccondry/bfcfa3bc284d72dd280afbc78044791a to your computer and use it in GitHub Desktop.
disable SSL cert checking for 1 request
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
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