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.

Using hyper.contrib.HTTP20Adapter with requests.session ignores proxies. #391

@PATAPOsha

Description

@PATAPOsha
import requests
from hyper.contrib import HTTP20Adapter

sess = requests.session()
sess.mount('http://', HTTP20Adapter())
sess.mount('https://', HTTP20Adapter())

sess.proxies.update({
                    'http': 'http://login:pass@ip:port',
                    'https': 'https://login:pass@ip:port'
                })

sess.get(url)

Actually, the problem is described in the title.
Request is sent using machine`s real ip, not proxy.

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