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