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
27 def <<(data)
28   res = super
29   @stream_complete = true if String(data).end_with?("\n\n")
30   res
31 end
complete? ()
[show source]
   # File lib/httpx/plugins/stream.rb
17 def complete?
18   super ||
19     stream? &&
20       @stream_complete
21 end
stream? ()
[show source]
   # File lib/httpx/plugins/stream.rb
23 def stream?
24   @headers["content-type"].start_with?("text/event-stream")
25 end