【问题标题】:How do I add HTTP headers when making calls to the Google Drive service via the Google API Python Client?通过 Google API Python 客户端调用 Google Drive 服务时,如何添加 HTTP 标头?
【发布时间】:2015-02-14 10:31:18
【问题描述】:

我正在构建一个通过 Drive API 从 Google Drive 获取文档的应用。我想在我的请求中添加一个“接受编码”标头。这是如何在 Python 中完成的?我正在使用google-api-python-client 我在这里使用了代码:https://developers.google.com/drive/web/quickstart/quickstart-python 作为我的应用程序的基础,但它没有详细说明如何添加自定义标题。

【问题讨论】:

标签: python google-drive-api


【解决方案1】:

你应该不需要编辑接受编码,因为python客户端库accepts and decodes gzip for you.

【讨论】:

    猜你喜欢
    • 2022-08-28
    • 2013-04-04
    • 2017-02-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    • 1970-01-01
    • 2020-07-14
    • 2017-08-31
    相关资源
    最近更新 更多