I have created an API endpoint using the Django python framework that I host externally. I can access my endpoint from a browser (mydomain.com/endpoint/
) and ve
If you are trying to call localhost on android simulator created with AVD, replacing localhost with 10.0.2.2 solved the issue for me.
THE SOLUTION is: on Android you need to specify the file path with file:// as prefix. So do like this:
const audio = {
uri: 'file://' + this.recorder.fsPath,
type: 'video/mp4',
name: filename
}
It seems that unencrypted network requests are blocked by default in iOS, i.e. https
will work, http
will not.
From the docs:
By default, iOS will block any request that's not encrypted using SSL. If you need to fetch from a cleartext URL (one that begins with http) you will first need to add an App Transport Security exception.
add http://
http://192.168.43.49:3000/user/
For me, the issue was because my Remote URL was incorrect. If you have the URL is a .env file, please crosscheck the naming and also ensure that it's prefixed with REACT_APP_ as react might not be able to find it if named otherwise.
In the .env file Something like REACT_APP_BACKEND_API_URL=https://appurl/api can be accessed as const { REACT_APP_BACKEND_API_URL } = process.env;
I was facing the same issue.
i looked deeper and my
endpoint
url
was not correct.
By giving axios
right exact url, my api worked like charm.
Hope it may help anyone