Method: HTTPX::Request::Body#stream

Defined in:
lib/httpx/request/body.rb

#stream(body) ⇒ Object

sets the body to yield using chunked trannsfer encoding format.



95
96
97
98
99
# File 'lib/httpx/request/body.rb', line 95

def stream(body)
  return body unless chunked?

  Transcoder::Chunker.encode(body.enum_for(:each))
end