带有请求参数的静态服务需要在Java代码中进行调整

时间:2019-05-20 10:40:58

标签: java restful-url

通过休息服务呼叫时,我们正在获取空数据 http://localhost:8103/contacts.svc/Contacts?$ filter = DTINSERT ge'2019-05-14'“;

请帮助我如何调整Java代码中的请求参数以调用服务。 http://localhost:8103/contacts.svc/Contacts?$ filter = DTINSERT ge'2019-05-14'“;

当前呼叫如下:

String url="http://localhost:8103/contacts.svc/Contacts?$filter=DTINSERT ge '2019-05-14'";
String xml=getContent(url); // this method for authorizatiom
System.out.println(xml);

最后我们收到错误的请求响应400。

请帮助我如何通过Java代码调整请求参数

0 个答案:

没有答案
相关问题