Ionic3 GET results in

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Ionic3 GET results in



I run into a strange issue.
I have a web service with 4 operations. Two of these operations succeed and two of them fail with a 401 (Unauthorized) or 405(Method Not Allowed).
All endpoint are in the same domain



GET plus.dnb.com/v1/search/typeahead
works fine



GET plus.dnb.com/v1/match/cleanseMatch
Failed to load resource: the server responded with a status of 401 (Unauthorized)
(index):1 Failed to load https://plus.dnb.com/v1/match/cleanseMatch?name=Klm&countryISOAlpha2Code=NL: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 401.



Both GET requests get exactly the same HTTP Headers
Why are both requests not consistenly showing the same behaviour ?



The same problem is also experienced with POST request:



POST https://plus.dnb.com/v1/search/criteria
works fine



POST plus.dnb.com/v2/token
OPTIONS plus.dnb.com/v2/token 405 (Method Not Allowed)
Failed to load https://plus.dnb.com/v2/token: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 405.



If this is a CORS related issue, then why is the behaviour not consistent ?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

u qUrt8cWsDjVk9 DXW,ARE2t6Q 43i25uhrVbBQdNreZOl9iLfVWXMo6oFYPYvaau
Ea7tdZ5s03

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

415 Unsupported Media Type while sending json file over REST Template