Skip to content

is there a way to force httpx to use ipv4, instead of ipv6 ? #2664

Answered by karpetrosyan
manatlan asked this question in General
Discussion options

You must be logged in to vote

Use local address attribute and bind it to ipv4 address like so:

import httpx

httpx.Client(transport=httpx.HTTPTransport(local_address="0.0.0.0"))

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@karpetrosyan
Comment options

Answer selected by tomchristie
@jeffsilverm
Comment options

@karpetrosyan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants