Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with https on React Native... #80

Open
joelvarty opened this issue Nov 5, 2021 · 0 comments
Open

issue with https on React Native... #80

joelvarty opened this issue Nov 5, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@joelvarty
Copy link
Member

When trying to use this with React Native, I'm getting an error... I think it's due to extra "agent" stuff we're doing with axios. Can we eliminate this code from api-client.js?

const https= require("https")

	let api = null;

	if (https.Agent) {
		//create apply the adapter to our axios instance
		api = axios.create({
			httpsAgent: new https.Agent({
				rejectUnauthorized: false
			}),
			adapter: adapter,
		})
	} else {
		//we can't use the https.Agent
		api = axios.create({
			adapter: adapter,
		})
	}
@joelvarty joelvarty added the bug Something isn't working label Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants