0
我正在使用Jersey開發REST服務。在一個PUT方法中,我想要使用一個字符串,然後在另一個方法中使用它。使用PUT方法發送字符串
是這樣的:我在「內容」字段中輸入一個字符串(TEST REST Web服務頁面),然後我使用該字符串在註銷方法:
@PUT
@Path("logout")
@Produces({"application/json", "text/plain"})
@Consumes(**xxxxx**)
public String logout(**xxxxx**) throws Exception
{
String reponse = null;
reponse = new UserManager().logout(**xxxxx**);
return reponse;
}
所以,我想知道要在** xxxxx **字段中放置什麼。
謝謝!
是的,我剛剛嘗試過,並且工作;) – user2144555 2013-03-18 16:08:10
太好了,隨時可以接受這個答案,如果它對你有幫助。祝好運與項目的其餘部分。 – Perception 2013-03-18 16:09:30
謝謝。我在想我需要某種註解。 – user2144555 2013-03-18 16:13:42