Skip to main content

Requests that supports HTTP/1.1 and HTTP/2

Project description

requests-h2

Requests that supports HTTP/1.1 and HTTP/2.

It may help people who want requests-style coding to send HTTP2 requests and don't want to upgrade their OpenSSL version, and it allows you to send HTTP/1.1 and HTTP/2 requests extremely easily.

requests-h2是一个支持http2的http请求库,本项目基于requests与httpcore,除增加了额外参数外,与requests使用方法一致。

You use it just like requests:

>>> import requests-h2 as requests
>>> r = requests.get('https://www.google.com', http2=True)
>>> r.status_code
200
>>> r.version
'HTTP/2'

Installation

You can install requests-h2 either via the Python Package Index (PyPI) or from source.

To install using pip:

pip install requests-h2

Requirements

Python 3.7+

Dependencies

  • requests
  • httpcore
  • urllib3<2

Motivation

We are used to using requests to send HTTP requests, but it doesn't support HTTP2 util 2023 and maybe util now. Although there are some libraries which have already supported HTTP2,but it's hard for me to change dependencies,so i created this project to meet my demands. And the urllib3 which requests relies on is doing their effort to support HTTP2,but they need OpenSSL > 1.11,and anyone who don't want to upgrade it still can use this library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

requests-h2-0.1.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

requests_h2-0.1.1-py2.py3-none-any.whl (19.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file requests-h2-0.1.1.tar.gz.

File metadata

  • Download URL: requests-h2-0.1.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for requests-h2-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ee762d1b4786aefa99098a650b823e01dbe787dd91da386882037aeb6bb43ff
MD5 248da078642189e653eda958cada65f1
BLAKE2b-256 9dfd34c770eb2c49fe099fc17269e4d5dea8c00954f71f29045100f01d2d0b74

See more details on using hashes here.

File details

Details for the file requests_h2-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: requests_h2-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for requests_h2-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 657fb8ed40ccccca088366d6b8331a0aa75b56a63166b3532ea0b5c2990ec8b4
MD5 07fbb733ee8d2edb9b75ea88db3d0608
BLAKE2b-256 104471391843a457245b13cc803b838960894ad502e0c8a31c6ff62041f99b1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page