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.



119
120
121
# File 'lib/httpx/adapters/faraday.rb', line 119

def response_on_data=(value)
  @response_on_data = value
end

Instance Method Details

#response=(response) ⇒ Object



121
122
123
124
125
126
127
# File 'lib/httpx/adapters/faraday.rb', line 121

def response=(response)
  super

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

  response.body.on_data = @response_on_data
end