Google API for Google Docs,下载文档列表 - 402 Not Found

时间:2011-03-13 03:38:14

标签: java android google-docs httpresponse google-api-java-client

从List Feed中获取文档ID后,我尝试使用google协议下载文档。

代码:

            HttpRequest request = transport.buildGetRequest();
        request.url = DocsUrl.forDownloadingFile(id, "txt");
        System.out.println("Request URL = "+request.url);
        try {
            HttpResponse  response = request.execute();
            System.out.println("Code = "+response.statusCode);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

但是我找到了402 Not Found。

访问文档的网址是

Request URL = https://docs.google.com/feeds/download/documents/Export%3FdocID=1ckJuekHM9I6NeOhcTagqxeW69sHC9IQkOyuF__eNUxk&exportFormat=txt

我在某个地方出错了吗?

谢谢, 萨纳。

0 个答案:

没有答案