Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for chunked responses in Curb #363

Merged
merged 1 commit into from Jan 31, 2014

Conversation

zbelzer
Copy link
Contributor

@zbelzer 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

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.'
@bblimke
Copy link
Owner

bblimke commented Jan 30, 2014

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

@zbelzer
Copy link
Contributor Author

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.

@bblimke
Copy link
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 added a commit that referenced this pull request Jan 31, 2014
Adds support for chunked responses in Curb
@bblimke bblimke merged commit 61819ef into bblimke:master Jan 31, 2014
@bblimke
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants