Module: Faraday::Adapter::HTTPX::OnDataPlugin::RequestMethods

Defined in:
lib/httpx/adapters/faraday.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#response_on_data=(value) ⇒ Object (writeonly)

Sets the attribute response_on_data

Parameters:

  • value

    the value to set the attribute response_on_data to.



123
124
125
# File 'lib/httpx/adapters/faraday.rb', line 123

def response_on_data=(value)
  @response_on_data = value
end

Instance Method Details

#response=(response) ⇒ Object



125
126
127
128
129
130
131
# File 'lib/httpx/adapters/faraday.rb', line 125

def response=(response)
  super

  return if response.is_a?(::HTTPX::ErrorResponse)

  response.body.on_data = @response_on_data
end