Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

hyper.contrib.HTTP20Adapter with requests.session not working on python 2.7 #419

Description

@ramazk
Python 2.7.10 (default, Oct  6 2017, 22:29:07) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> from hyper.contrib import HTTP20Adapter
>>> s = requests.Session()
>>> s.mount('https://http2.pro', HTTP20Adapter())
>>> s.get('https://http2.pro/api/v1').json()
{u'push': 0, u'protocol': u'HTTP/1.1', u'user_agent': u'python-requests/2.22.0', u'http2': 0}

On python3 same code shows:
{'http2': 1, 'protocol': 'HTTP/2.0', 'push': 0, 'user_agent': 'python-requests/2.22.0'}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions