Adds support for chunked responses in Curb #363

Merged
merged 1 commit into from Jan 31, 2014

Conversation

Projects
None yet
2 participants
Contributor

zbelzer commented Jan 29, 2014

Calls the 'on_body' callback for each 'chunk' of the body of a webmock response if the response responds to :each and the Transfer-Encoding is 'chunked.'

This is useful for verifying that streaming requests are processing each chunk in the body of a request.

Finished in 37.38 seconds
3577 examples, 0 failures

Finished in 0.2438 seconds
30 examples, 0 failures

Finished in 0.021785s, 459.0314 runs/s, 596.7409 assertions/s.
10 runs, 13 assertions, 0 failures, 0 errors, 0 skips

Finished in 0.014473s, 1174.6010 runs/s, 2694.6728 assertions/s.
17 runs, 39 assertions, 0 failures, 0 errors, 0 skips
@zbelzer zbelzer Adds support for chunked responses in Curb
Calls the 'on_body' callback for each 'chunk' of the body of a webmock
response if the response responds to :each and the Transfer-Encoding is
'chunked.'
f85fc15
Owner

bblimke commented Jan 30, 2014

Nice. I presume that's to reflect the way Curb behaves?

Contributor

zbelzer commented Jan 30, 2014

Yeah, I would imagine that any library that supports streaming has to have a callback. A quick google says Excon does it.

The reliance on each was just an additional way to associate particular kinds of bodies with chunked responses to protect against use cases I wasn't thinking of.

Owner

bblimke commented Jan 31, 2014

Awesome, thanks! I love the copy of test output. Every shall require that for any new pull request :)

@bblimke bblimke added a commit that referenced this pull request Jan 31, 2014

@bblimke bblimke Merge pull request #363 from zbelzer/add_curb_chunked_responses
Adds support for chunked responses in Curb
61819ef

@bblimke bblimke merged commit 61819ef into bblimke:master Jan 31, 2014

1 check failed

default The Travis CI build failed
Details
Owner

bblimke commented Feb 2, 2014

Released as 1.17.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment