module HTTPX::Plugins::Stream::ResponseMethods

  1. lib/httpx/plugins/stream.rb

Methods

Public Instance

  1. <<
  2. complete?
  3. stream?

Public Instance methods

<< (data)
[show source]
   # File lib/httpx/plugins/stream.rb
24 def <<(data)
25   res = super
26   @stream_complete = true if String(data).end_with?("\n\n")
27   res
28 end
complete? ()
[show source]
   # File lib/httpx/plugins/stream.rb
14 def complete?
15   super ||
16     stream? &&
17       @stream_complete
18 end
stream? ()
[show source]
   # File lib/httpx/plugins/stream.rb
20 def stream?
21   @headers["content-type"].start_with?("text/event-stream")
22 end