custom app external api response not working
Posted: 14 Sep 2022, 09:34
Hi ,
we build custom app to integrate with API server for : user need to enter his mobile number , the API server will get the user response , check his balance and recharge his hsnm user
but using the API url inside the custom app , not provide us the response as normal using in browser
the error we observe :
from origin 'http://wifi.ps' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
after set no-cors in the custom app .. the API integration working and recieve transaction to external server , but without response
method: 'GET',
cache: 'no-cache',
mode: 'no-cors',
and the response are : "failed to load response data : NO data found for given resource with given identifier "
how we can solve it while we try all things :
we build custom app to integrate with API server for : user need to enter his mobile number , the API server will get the user response , check his balance and recharge his hsnm user
but using the API url inside the custom app , not provide us the response as normal using in browser
the error we observe :
from origin 'http://wifi.ps' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
after set no-cors in the custom app .. the API integration working and recieve transaction to external server , but without response
method: 'GET',
cache: 'no-cache',
mode: 'no-cors',
and the response are : "failed to load response data : NO data found for given resource with given identifier "
how we can solve it while we try all things :