When i develop a servlet and overrivde the doGet method.I can access the value of the parameters passed in the URL like req.getParameter("myParam").the URL will be like http://mysite:8080/APP?myParam=123 . For the case of Rest Webservice(suppose the implementation is Jersey) if i make the Get Service like this
@Get
@Path("myfunction")
@Compress
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response myfunction(@QueryParam("myParam") String myParam)
The url will be like this http://mysite:8080/APP/myfunction/123
Both URl can be invoked using curl or postman.But i did not understand what's the difference between them?
And how can i make a Get Rest Service (using jersey) so that the URL will be like this http://mysite:8080/APP?myParam=123 and in backend i can get this myparam?
Thanks