About Question enthuware.ocejws.v6.2.184 :
Moderators: Site Manager, fjwalraven
-
- Posts: 4
- Joined: Sun Apr 20, 2014 6:33 pm
- Contact:
About Question enthuware.ocejws.v6.2.184 :
Don't we need annotation @Consumes("application/x-www-form-urlencoded") for request processor to choose right method in this question?
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.184 :
Hi !
It is not necessary to add an @Consumes annotation. When you don't provide one to your method it will use the default @Consumes("*/*") annotation (meaning: all media types are allowed).
Regards,
Frits
It is not necessary to add an @Consumes annotation. When you don't provide one to your method it will use the default @Consumes("*/*") annotation (meaning: all media types are allowed).
Regards,
Frits
-
- Posts: 4
- Joined: Sun Apr 20, 2014 6:33 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.184 :
Html form submit sends HTTP request with header "Content-Type: application/x-www-form-urlencoded". In this case, the method which consumes "application/x-www-form-urlencoded" take higher precedence than method consumes "*/*".
Am I Correct?
Am I Correct?
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.184 :
Correct, that is how it normally works if there are multiple methods in the same root resource class.
However, in this question, the methods cannot be in the same resource file (they all have the same name and number of parameters).
Regards,
Frits
However, in this question, the methods cannot be in the same resource file (they all have the same name and number of parameters).
Regards,
Frits
Who is online
Users browsing this forum: No registered users and 1 guest