I want to use a web api in ionic . but result cannot be shown…
when i use a different api i.e (swapi.co/api/films/) its show a result… but my api cannot show the results. it will generate a error i.e
Failed to load strong texthttp://online.efuinsurance.com:9003/Web_Master_App/eMisc/country: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8100’ is therefore not allowed access.
Add the missing header to the response of your API as it says in the error message.
how can i add header?
I can not tell you that, as it is part of the API you are using at
http://online.efuinsurance.com:9003/Web_Master_App/eMisc/country. This URL has to return the hedaer.
yes. i can use this API to call data but CORS error generate… How to add header kindly guide me
See my previous answer. I can not tell you more than that: The API has to return that header in its response.