module HTTPX::Plugins::Expect::InstanceMethods

  1. lib/httpx/plugins/expect.rb

Methods

Public Instance

  1. fetch_response

Public Instance methods

fetch_response(request, connections, options)
[show source]
    # File lib/httpx/plugins/expect.rb
 99 def fetch_response(request, connections, options)
100   response = @responses.delete(request)
101   return unless response
102 
103   if response.is_a?(Response) && response.status == 417 && request.headers.key?("expect")
104     response.close
105     request.headers.delete("expect")
106     request.transition(:idle)
107     send_request(request, connections, options)
108     return
109   end
110 
111   response
112 end