【发布时间】:2018-11-07 16:41:07
【问题描述】:
http://www.mkyong.com/webservices/jax-rs/restful-java-client-with-jersey-client/
我使用此链接从我的应用程序中进行了休息呼叫。在这里,我可以将一个对象作为输入参数传递。
Client client = Client.create();
WebResource webResource = client .resource("http://localhost:8080/RESTfulExample/rest/json/metallica/post");
String input = "{\"singer\":\"Metallica\",\"title\":\"Fade To Black\"}";
ClientResponse response = webResource.type("application/json") .post(ClientResponse.class, **input**);
我需要传递多个输入参数(如图像、字符串等)来代替输入,而不是作为一个对象。我该如何解决这个问题?
【问题讨论】:
标签: java jersey-client