GET 요청에 잘 작동하는 Java RestfulWeb Service를 만들었습니다. 그러나 POST 요청을 수락하는 방법에 대한 좋은 리소스를 찾을 수 없습니다.Java 웹 서비스에 대한 간단한 POST 요청
이 내가 웹에서이 방법을 액세스하기 위해 난 그냥 mywebservice.com/hello/thisismyID로 이동하는 방법은 "ID"를 수신에서
@Path("/hello")
public class Hello {
@GET
@Path(value = "/ids/{id}")
public String ids(@PathParam(value = "id") final String id) throws JSONException {
return getResults("select * from " + id);
}
GET 실행하는 방법입니다.
POST로 수행해야하는 경우 어떻게 보입니까? 사전에
감사합니다,
-D
사용'@ POST' 대신'의를 @ 알 겠어? –
읽어보기 http://stackoverflow.com/questions/8194408/how-to-access-parameters-in-a-restful-post-method – MariuszS