Tom Most
Tom Most
The quoted text is discussing the arguments of the callable, but the next paragraph does call out that the return value must not be a list. This doesn't seem like...
Unfortunately I think that the specific API exposed by requests (the *cert* argument) is in conflict with another Treq feature: the ability to pass a custom `Agent`. Control over TLS...
I've used requests a fair bit, and I find that `verify=False` is more broad than the behavior I actually want. What I _do_ want is the equivalent of pip's `--trusted-host`...
_If_ the server set a `Content-Length` header you can look there. If it didn't then that information isn't there at the HTTP level.
@glyph Sure, though it may be a while (a few weeks) as I'm pretty busy right now.
"Fail" is the right term because the API needs to consume the response body. Something like: ```py @defer.inlineCallbacks def txmain(reactor): response = yield treq.get(url) yield response.expect_status() body = yield response.content()...
Ah, I still live in a Python 2.7-compatible world, so `async with` didn't occur to me. However the other thing I had in mind is including the response body (or...
I don't follow your example. How does it consume the body when `raise_for_status()` raises an exception? As for a streaming response, that's what timeouts and response size limits are for.
I think you're getting tripped up by a weird asymmetry in the `RequestSequence` API. https://github.com/twisted/treq/blob/2d28bf57c8695657ca04bc8c36924f17fcd286f4/src/treq/testing.py#L296-L298 At this point `headers` is the _request_ headers. Its type is `Dict[bytes, List[bytes]]`. https://github.com/twisted/treq/blob/2d28bf57c8695657ca04bc8c36924f17fcd286f4/src/treq/testing.py#L316-L318 Now...
Yes, absolutely. We should do the same with `Resource.putChild()`.