How can I set options in the fetch
method of react-native to make a call to a webserver go through a proxy.
Currently I am using axios but this doesn't work.
After adding a host header to the fetch, I can make a request through charles-proxy but it doesn't work with squid. (Error: invalid url
).
Hello You can use this module node-fetch(https://github.com/bitinn/node-fetch) and set
agent
param for proxy,For more details, you can also check this https://github.com/bitinn/node-fetch/issues/79