You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works as expected. However, if logging is used then an HTTP::StateError is raised:
require'http'require'logger'logger=Logger.new($stdout)response=HTTP.use({logging: {logger: logger}}).get('https://news.ycombinator.com')response.body.each{ |chunk| puts(chunk)}# raises: http/response/body.rb:67:in `stream!': body has already been consumed (HTTP::StateError)
The text was updated successfully, but these errors were encountered:
Per the documentation, it should be possible to pass a an
each
block to body to stream:This works as expected. However, if logging is used then an
HTTP::StateError
is raised:The text was updated successfully, but these errors were encountered: