request / request-promise

The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
ISC License
4.77k stars 297 forks source link

ignore proxy signed certificate(ssl) issue in request-promise #365

Open minuk0612 opened 3 years ago

minuk0612 commented 3 years ago

It is showing error in return statement idk where i m going wrong how should i make it work please guide

` function fetchAPI(url, email, apiKey, zoneTag) { let request = new Request(url, verify=False) let query = {"query":"{\n viewer {\n zones(filter: { zoneTag: "> ...} let init = { method: 'POST', body: JSON.stringify(query), insecure: true } request.headers.set('x-auth-key', apiKey) request.headers.set('x-auth-email', email) return fetch(request, init) }

`(index):128 POST https://api.cloudflare.com/client/v4/graphql net::ERR_CERT_INVALID i have tried this too its giving me error like this in my javascript code.

shirshak55 commented 3 years ago

rejectUnauthorized: false too.