What are the differences between PUT and POST in REST?

DWQA QuestionsCategory: Web Design HTMLWhat are the differences between PUT and POST in REST?
Editor Staff asked 1 month ago

What do you understand by request method designator annotations?

1 Answers
Editor Staff answered 1 month ago

They are the runtime annotations in the JAX-RS library that are applied to Java methods. They correspond to the HTTP request methods that the clients want to make. They are @GET, @POST, @PUT, @DELETE, @HEAD.
Usage Example:

import javax.ws.rs.Path;
/**
* InterviewBitService is a root resource class that is exposed at 'resource_service' path
*/
@Path('resource_service')
public class InterviewBitService {
    @GET
    public String getRESTQuestions() {
        // some operations
    } 
}