Failed Http Post Request Because Of Cors
I do not manage to get my application running. I was reading about this the whole day, tried a bunch of stuff, but in the end nothing did work. In the last attempt I tried this lin
Solution 1:
The Options request is not handled by login
, so createResponse
is not called.
Have a look at: https://blogs.oracle.com/theaquarium/entry/supporting_cors_in_jax_rs (you should implement a javax.ws.rs.container.ContainerResponseFilter
, see How to handle CORS using JAX-RS with Jersey)
Another possibility for your code here (but not if you develop a 'real' application): add @javax.ws.rs.OPTIONS
to your method like you did with @javax.ws.rs.POST
.
Post a Comment for "Failed Http Post Request Because Of Cors"