cloudant java 客户端是否支持列表功能?
Is the lists function supported in cloudant java client?
在 cloudant java 客户端 (http://www.javadoc.io/doc/com.cloudant/cloudant-client/2.2.0) 中,是否支持此处描述的列表功能?
https://cloudant.com/blog/building-custom-dashboards-with-geckoboard-and-cloudant
在 java-cloudant 2.2.0 中没有特定的 API 调用来与 _list
端点交互。
但是,可以手动设置请求,因此您可以尝试以下方法:
// Compose the URI and create a HttpConnection to GET it
URI listRequestURI = new URI(db.getDBUri().toString()
+ "/_design/your-designdoc/_list/your-list/your-view");
HttpConnection listRequest = Http.GET(listRequestURI);
// Execute the request and get the response
HttpConnection listResponse = account.executeRequest(listRequest);
// Get the response in the desired format and process
listResponse.responseAsString();
// or responseAsBytes()
// or responseAsInputStream()
在 cloudant java 客户端 (http://www.javadoc.io/doc/com.cloudant/cloudant-client/2.2.0) 中,是否支持此处描述的列表功能?
https://cloudant.com/blog/building-custom-dashboards-with-geckoboard-and-cloudant
在 java-cloudant 2.2.0 中没有特定的 API 调用来与 _list
端点交互。
但是,可以手动设置请求,因此您可以尝试以下方法:
// Compose the URI and create a HttpConnection to GET it
URI listRequestURI = new URI(db.getDBUri().toString()
+ "/_design/your-designdoc/_list/your-list/your-view");
HttpConnection listRequest = Http.GET(listRequestURI);
// Execute the request and get the response
HttpConnection listResponse = account.executeRequest(listRequest);
// Get the response in the desired format and process
listResponse.responseAsString();
// or responseAsBytes()
// or responseAsInputStream()