Ionic http post - .jsp compatibility issue?

I’m using Angular HTTP to make a post request to a .jsp controller.

    return,{test:'hello'}).map((response: Response)=> {
        return response.json();

In chrome dev tools I am seeing the following error:

Request Method: OPTIONS
Status Code: 405 JSPs only permit GET POST or HEAD

it’s as if the browser didn’t detect that the request was a post?
Any ideas on how I can get around this error?


Google “CORS” and “preflight request”. This is a security feature of browsers that you can’t easily turn off.

You can probably work around by using the Service Proxies offered by Ionic CLI:

Okay, thank you for the guidance. :slight_smile: