java通过url调用webapi并接收其返回的json数据,但现在结果总是:{"result":4,"data":{}}(未认证:),帮助文档如下:API使用方法WebAPI使用是通过GET或者POST方法,将数据传送给光盘...
java通过url调用web api并接收其返回的json数据,但现在结果总是: {"result":4,"data":{}}(未认证:),帮助文档如下:
API 使用方法
Web API 使用是通过GET 或者POST 方法,将数据传送给光盘库服务器的函数。请留意如下内
容使用Web API:
使用GET方法时
为了维护Session,请使用Cookie。
使用POST方法时
为了维护Session,请使用Cookie。
另外,登陆认证用数据时,请传送“authenticity_token”
“authenticity_token”包含“+”等符号,请使用适当的编码。
我不明白,大家帮忙指点下,谢谢~~如下是我的读取json数据的代码:
public String getJsonString(String urlPath) {
HttpURLConnection connection = null;
StringBuffer sb = new StringBuffer("");
String str = null,str1 = null;
try {