cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: JAX-RS CORS unable to accept POST as application/json
Date Wed, 11 Jul 2012 09:30:46 GMT
Hi
On 11/07/12 07:00, ramesh wrote:
>
> These are the annotations I use in my interface
>
> @Path("/for")
> @Produces("application/json")
> @Consumes("application/json")
> public interface CustomerService {
>
>
> @POST
> @Produces("application/json")
> @Consumes("application/json")
> @CrossOriginResourceSharing(
> allowAllOrigins = true,
> allowHeaders = {
> "content-type:application/json"
> },
> exposeHeaders = {
> "content-type:application/json"
> }
> )
>
> Response addMember(Customer customer);
>
> My POST request from Javascript client is getting preflighted and
> Http-Method turns to OPTIONS and Content-Type to blank.
> What are the right configurations to avoid preflight and make a
> successful POST with content-type: application/json
>

How you capture the request from the browser ? I'd like to see what it 
actually POSTs

thanks, Sergey

> Appreciate any help
>
> regards
> Ramesh
>
>
>
>



Mime
View raw message