Python requests like API built on top of Twisted's HTTP client.
treq.collect(response, collector)
throws an exception, that error will now be returned to the caller of collect()
via the result Deferred
, and the underlying HTTP transport will be closed. (#347)build-system
metadata is now provided in pyproject.toml
. (#329)treq.testing.StubTreq
now persists twisted.web.server.Session
instances between requests. (#327)dev
extra to the new docs
extra. (#296)six
or mock
. (#318)bytes
for usernames and passwords. Text is encoded as UTF-8, per RFC 7617. Previously only ASCII was allowed. (#268)bytes
, fixing a regression first introduced in treq 20.4.1. (#303)http_headers.Headers
passed as the headers parameter when the auth parameter is also passed. (#314)treq.auth.add_auth()
and treq.auth.add_basic_auth()
is now marked to provide twisted.web.iweb.IAgent
. (#312)six >= 1.13
, noting a dependency introduced in treq 20.9.0. (#295)treq.auth
module has been documented. (#313)dict
, twisted.web.http_headers.Headers
, or None
. Historically falsy values like []
or ()
were accepted. (#294)treq.get()
and HTTPClient.post()
now issue a DeprecationWarning
when passed unknown keyword arguments, rather than ignoring them. Mixing the json argument with files or data is also deprecated. These warnings will change to a TypeError
in the next treq release. (#297)HTTPClient.request()
(and shortcuts like get()
) now accept hyperlink.DecodedURL
and hyperlink.URL
in addition to str
and bytes
. (#212)HTTPClient.request()
(and shortcuts like :meth:~HTTPClient.get()
) now accept :class:hyperlink.DecodedURL
and :class:hyperlink.URL
in addition to :class:str
and :class:bytes
. (#212 <https://github.com/twisted/treq/issues/212>
__)#278 <https://github.com/twisted/treq/issues/278>
__)treq.client.HTTPClient.request()
and its aliases no longer raise UnicodeEncodeError
when passed a Unicode url and non-empty params. Now the URL and query parameters are concatenated as documented. (#264)&
or #
. Now these characters are properly escaped. (#282)treq.client.HTTPClient
over the module-level convenience functions in the treq
module. (#276)