Skip to content

How to dynamically update the proxy address of an object after it is created, and whether there is a similar method in HTTPX like using "session.proxies.update"? #2617

Closed

Description

@RavenCri

Please tell me how to do it. Thank you very much. I need the help of the community.

import requests
session = requests.Session()
proxies = {
    "http": "http://old-proxy-ip:port",
    "https": "http://old-proxy-ip:port",
}
session.proxies.update(proxies)
new_proxies = {
    "http": "http://new-proxy-ip:port",
    "https": "http://new-proxy-ip:port",
}
session.proxies.update(new_proxies)

Activity

  1. changed the title [-]How to dynamically update the interface address of an object after it is created, and whether there is a similar method in HTTPX like using "session.proxies.update"?[/-] [+]How to dynamically update the proxy address of an object after it is created, and whether there is a similar method in HTTPX like using "session.proxies.update"?[/+] on Mar 5, 2023
  2. locked and limited conversation to collaborators on Mar 6, 2023
  3. converted this issue into a discussion #2618 on Mar 6, 2023
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