我使用此来获取来自返回json的网络服务的pojo结果:
String wsURI = "server.com/myservice?param=a";
try {
URL url = new URL(wsURI);
URLConnection connection = url.openConnection();
ObjectMapper mapper = new ObjectMapper();
ResultPojo resultPojo = mapper.readValue(connection.getInputStream(), ResultPojo.class);
} catch (Exception e) {}
但现在我想发送 pojo到webservice(接受json的web服务):
String wsURI =" server.com/myservice? param = myPojo ";
如何实现这一目标?是否有可能或者我是否需要使用其他一些libs&罐子?
谢谢,