mardi 30 janvier 2018

POST requests without Content-Type header pass throught @Consumes check(In Jersey application)

We created Jersey service for client with two classes, we used First class with Content type Multiple Part Form Data -- @POST @Consumes(MediaType.MULTIPART_FORM_DATA) and in Second class we used only @POST as per our requirement. Service is working fine but client is hitting to Application without any content type so request is mapping with first class which lead to error.

As per my query it should match with 2nd class @POST if we do not use any content Type.

In 1st Class

@POST @Consumes(MediaType.MULTIPART_FORM_DATA) public Response submitForm(

In 2nd class

@POST public Response submitForm(

QUESTION : POST requests without Content-Type header pass throught @Consumes check.




Aucun commentaire:

Enregistrer un commentaire