DISCLAIMER: I was looking for a comprehensive answer to this question, and yes, I found this other question: https://stackoverflow.com/questions/10315728/how-to-send-parameters-as-formparam-to-webservice , But firstly, this question asks about Javascript, while I ask about Java, and secondly, it has no answers anyway. So to the question ...
Using RESTful services, passing @QueryParamto a service is @GETquite simple, since you can simply add pairs of variable names / values ββto the URL and use it to get to the server from the program. Is there any way to do this using @FormParam?
For example, let's say I have the following RESTful service:
@POST
@Produces("application/xml")
@Path("/processInfo")
public String processInfo(@FormParam("userId") String userId,
@FormParam("deviceId") String deviceId,
@FormParam("comments") String comments) {
}
... , - :
public void updateValues(String comments) {
String userId = getUserId();
String deviceId = getDeviceId();
}
?
.. , . , RESTful , , . , RESTful .
!