跳转到主要内容

Robocorp HTTP库

项目描述

robocorp-http

我们将弃用robocorp-http库,并建议直接使用requests库。

requests库的使用非常广泛,几乎任何AI/LLM都能够提供所需的代码,因此我们不需要额外的包装。

import requests


def download_file(url, local_filename):
    response = requests.get(url)
    response.raise_for_status()  # this will raise an exception if the request fails
    with open(local_filename, 'wb') as stream:
        stream.write(response.content)  # write the content of the response to a file
    return local_filename

注意:requests库已包含在robocorp包中。

有关更多信息,请参阅我们的Requests第三方库文档。

项目详情


下载文件

下载您平台对应的文件。如果您不确定选择哪个,请了解有关安装包的更多信息

源代码分发

robocorp_http-0.4.1.tar.gz (2.4 kB 查看哈希值)

上传时间 源代码

构建分发

robocorp_http-0.4.1-py3-none-any.whl (3.1 kB 查看哈希值)

上传时间 Python 3

由以下支持