我想给http://www.cleartrip.com/places/hotels/info/41748打一个安静的网络服务电话
如何在请求字符串中形成动态属性?以下是我尝试过但不起作用的方法:
Client client = ClientBuilder.newClient();
client.property("hotelnr", 41748);
//works not (HTTP 404 Not Found):
client.target("http://www.cleartrip.com/places/hotels/info/{hotelnr}").request(MediaType.APPLICATION_XML).get();
//works:
client.target("http://www.cleartrip.com/places/hotels/info/41748").request(MediaType.APPLICATION_XML).get();