I have my api rest done in nodejs (express) which is local link , my configuration of cors de my api rest it's
const cors = require('cors')
app.use(cors());
then in my ionic application when I start ionic serve -c in my browser on my pc all the Http requests work which I use HttpClientModule when I already try it on IonicDev App or in the Android studios Emulator I receive an error
{
“data”: null,
“status”: 0,
“config”: {
“method”: “GET”,
“transformRequest”: [null],
“transformResponse”: [null],
“Accept”: “ application / json ”,
“ Content-Type ”:“ application / json ”,
“ url ”:“
I've also tried creating a proxy in ionic.config.json but I keep throwing the same error
"proxies": [
{
"path": "/api",
"proxyUrl": "http://aqui.com/api"
}
]