0

我有通过以下代码授权自己获得的谷歌文档列表:

<cfhttp url="https://www.google.com/accounts/ClientLogin" method="post" result="result" charset="utf-8">
        <cfhttpparam type="formfield" name="accountType" value="HOSTED_OR_GOOGLE">
        <cfhttpparam type="formfield" name="Email" value="abc@gmail.com">
        <cfhttpparam type="formfield" name="Passwd" value="xyz">
        <cfhttpparam type="formfield" name="service" value="writely">
        <cfhttpparam type="formfield" name="source" value="abc-xyz-2010">
    </cfhttp>

现在我可以借助 content.xmlAttribute 从包含所有文档的 xml 文件中下载 word 文档和 PPT。但我无法下载 PDF 文件。我收到的错误消息是“授权需要错误 401”。我检查了文档说:也无法手动构建这些类型文件的下载 URL。相反,将经过身份验证的 HTTP GET 发送到条目的 src 链接:

<content type="text/html" src="https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm.../YzI2Y2ExYWVm?h=16655626&e=download&gd=true"/>

有人可以告诉我如何传递授权信息并让 PDF 下载链接正常工作。非常感谢提前!!

4

1 回答 1

0

method="post"替换为method="get"

于 2010-02-18T09:38:06.393 回答