* NetRCAuth class
* Add docs for httpx.NetRCAuth()
* Drop failing cross-domain test for NetRCAuth()
* Update tests
* Update httpx/_auth.py
* Add tests for netrc file with no password
* Drop RawURL
* First pass at adding urlparse
* Update urlparse
* Add urlparse
* Add urlparse
* Unicode non-printables can be valid in IDNA hostnames
* Update _urlparse.py docstring
* Linting
* Trim away ununsed codepaths
* Tweaks for path validation depending on scheme and authority presence
* Minor cleanups
* Minor cleanups
* full_path -> raw_path, forr internal consistency
* Linting fixes
* Drop rfc3986 dependency
* Add test for #1833
* Linting
* Drop 'rfc3986' dependancy from README and docs homepage
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
I was recently migrating a project from Requests to HTTPX, and I stumbled a bit on the default socket timeouts being different between the two, which I haven't seen explicitly mentioned anywhere.
This adds a mention of those differences to the compatibility section, feel free to edit it or move it around as you choose.
* Add Response(..., default_encoding=...)
* Add tests for Response(..., default_encoding=...)
* Add Client(..., default_encoding=...)
* Switch default encoding to 'utf-8' instead of 'autodetect'
* Make charset_normalizer an optional dependancy, not a mandatory one.
* Documentation
* Use callable for default_encoding
* Update tests for new charset autodetection API
* Update docs for new charset autodetection API
* Update requirements
* Drop charset_normalizer from requirements
Per https://www.python-httpx.org/compatibility/#proxy-keys, there should
always be a `://` after the protocol. The given examples raise an
exception when used as-is.
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
* update docstring/docs for transport based on pull #1840
* Update httpx/_transports/base.py
* lint'd
Co-authored-by: Tom Christie <tom@tomchristie.com>
There is no 'backend' parameter to AsyncHTTPTransport and it seems that
the backend is detected automatically for anyio as it is for other async
libraries.
* Expand note for async custom handler responses
Custom response handlers need to run `response.read()` before they can read the content of the response. However when using an AsyncClient this will produce an error of `RuntimeError: Attempted to call a sync iterator on an async stream.`. Took me some digging to figure out I just needed to use `response.aread()` here instead of `response.read()` so figured I would an MR with an expansion on the note for anyone else.
Thanks!
* Update advanced.md
* Add cli support
* Add setup.py
* Import main to 'httpx.main'
* Add 'cli' to requirements
* Add tests for command-line client
* Drop most CLI tests
* Add test_json
* Add test_redirects
* Coverage exclusion over _main.py in order to test more clearly
* Black formatting
* Add test_follow_redirects
* Add test_post, test_verbose, test_auth
* Add test_errors
* Remove test_errors
* Add test_download
* Change test_errors - perhaps the empty host header was causing the socket error?
* Update test_errors to not break socket
* Update docs
* Update version to 1.0.0.beta0
* Tweak CHANGELOG
* Fix up images in README
* Tweak images in README
* Update README
* Switch default on allow_redirects to False
* allow_redirects -> follow_redirects
* Update follow_redirects default in top-level API
* Update docs on follow_redirects