lib/httpx/request.rb in httpx-0.7.0 vs lib/httpx/request.rb in httpx-0.8.0

- old
+ new

@@ -56,10 +56,16 @@ @body = @options.request_body_class.new(@headers, @options) @state = :idle end + def interests + return :r if @state == :done || @state == :expect + + :w + end + # :nocov: if RUBY_VERSION < "2.2" # rubocop: disable Lint/UriEscapeUnescape: def initialize_with_escape(verb, uri, options = {}) initialize_without_escape(verb, URI.escape(uri.to_s), options) @@ -217,9 +223,10 @@ def transition(nextstate) case nextstate when :idle @response = nil + @drainer = nil when :headers return unless @state == :idle when :body return unless @state == :headers || @state == :expect