how to disable SSL in react native expo in fetch or axios API call

Viewed 422

I am trying to disable SSL in react native expo

here is what I have tried

import * as https from "https"

const agent = new https.Agent({
  rejectUnauthorized: false,
});

let response = await axios(options, { httpsAgent: agent });

But its throwing an error on npm start

While trying to resolve module https from file D:\work\ALPHA OBS\gosi\app\screens\Authentication\signIn.js, the package D:\work\ALPHA OBS\gosi\node_modules\https\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (D:\work\ALPHA OBS\gosi\node_modules\https\index.js. Indeed, none of these

Please Guide me over this.

0 Answers
Related