有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (1) 个答案

  1. # 1 楼答案

    在JavaCloudAnt2.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()