When trying to fetch to server with proxy, it just ignores proxy setting and fetch to server.
This problem already mentioned in this issue (https://github.com/mzabriskie/axios/issues/672)
But closed for some reason. and still occurred now.
I am using latest versions of react-native, and axios.
Here is my code below.
let config = {
proxy: {
host: '127.0.0.1',
port: 8118
}
}
axios.get('https://api.ipify.org/', config)
.then(function (response) {
console.log("-----------");
console.log(response.data);
console.log("-----------");
})
Output: _Original IP, not proxied one
_
Closing, see duplicate.
I am still having this issue with react-native 0.57.1 (Expo 32.0.0)
Anyone know an alternative to send http request with proxy in RN ?
@mrmarktyy Hey Mark how did you manage to solve it?
I'm trying to call a proxy server from react-native and unable to do so, any help would be really appreciated.