java - How to implement REST class to handle all HTTP methods in a single method -


I am using the Jersey implementation of the JX-RS specification, writing specific methods to handle each HTTP request type Has been done, such as Post, GET. Keep and remove but I want to know how we can handle all of these requests in the same method. This can be a trivial question, please share your thoughts.

First of all, I do not recommend it for smells and Almost certainly being said to lead to unmaintainable code being said, in Java we have to override the service method, from Zor Khan -

About No reason is the service standard HTTP requests handler method for each HTTP request type (above doXXX methods) On Quantify sending manages them.

It's okay what you're doing, so override

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -