Class: Faraday::Adapter

### Home Classes Methods

### In Files

- lib/faraday/adapter.rb
- lib/faraday/adapter/em_http.rb
- lib/faraday/adapter/em_synchrony.rb
- lib/faraday/adapter/em_synchrony/parallel_manager.rb
- lib/faraday/adapter/excon.rb
- lib/faraday/adapter/httpclient.rb
- lib/faraday/adapter/net_http.rb
- lib/faraday/adapter/net_http_persistent.rb
- lib/faraday/adapter/patron.rb
- lib/faraday/adapter/rack.rb
- lib/faraday/adapter/test.rb
- lib/faraday/adapter/typhoeus.rb
- lib/faraday/autoload.rb

### Parent

Middleware

### Namespace

- MODULE Faraday::Adapter::Parallelism
- CLASS Faraday::Adapter::EMHttp
- CLASS Faraday::Adapter::EMSynchrony
- CLASS Faraday::Adapter::Excon
- CLASS Faraday::Adapter::HTTPClient
- CLASS Faraday::Adapter::NetHttp
- CLASS Faraday::Adapter::NetHttpPersistent
- CLASS Faraday::Adapter::Patron
- CLASS Faraday::Adapter::Rack
- CLASS Faraday::Adapter::Test
- CLASS Faraday::Adapter::Typhoeus

### Methods

- #call
- #save_response

### Class/Module Index

Quicksearch

- Faraday
- Faraday::Adapter
- Faraday::Adapter::EMHttp
- Faraday::Adapter::EMHttp::Manager
- Faraday::Adapter::EMHttp::Options
- Faraday::Adapter::EMSynchrony
- Faraday::Adapter::EMSynchrony::ParallelManager
- Faraday::Adapter::Excon
- Faraday::Adapter::HTTPClient
- Faraday::Adapter::NetHttp
- Faraday::Adapter::NetHttpPersistent
- Faraday::Adapter::Parallelism
- Faraday::Adapter::Patron
- Faraday::Adapter::Rack
- Faraday::Adapter::Test
- Faraday::Adapter::Test::Stub
- Faraday::Adapter::Test::Stubs
- Faraday::Adapter::Test::Stubs::NotFound
- Faraday::Adapter::Typhoeus
- Faraday::AutoloadHelper
- Faraday::ClientError
- Faraday::CompositeReadIO
- Faraday::Connection
- Faraday::ConnectionFailed
- Faraday::ConnectionOptions
- Faraday::Env
- Faraday::Error
- Faraday::FlatParamsEncoder
- Faraday::Middleware
- Faraday::MiddlewareRegistry
- Faraday::MissingDependency
- Faraday::NestedParamsEncoder
- Faraday::Options
- Faraday::ParsingError
- Faraday::ProxyOptions
- Faraday::RackBuilder
- Faraday::RackBuilder::Handler
- Faraday::RackBuilder::StackLocked
- Faraday::Request
- Faraday::Request::Authorization
- Faraday::Request::BasicAuthentication
- Faraday::Request::Instrumentation
- Faraday::Request::Instrumentation::Options
- Faraday::Request::Multipart
- Faraday::Request::Retry
- Faraday::Request::Retry::Options
- Faraday::Request::TokenAuthentication
- Faraday::Request::UrlEncoded
- Faraday::RequestOptions
- Faraday::ResourceNotFound
- Faraday::Response
- Faraday::Response::Logger
- Faraday::Response::Middleware
- Faraday::Response::RaiseError
- Faraday::SSLError
- Faraday::SSLOptions
- Faraday::TimeoutError
- Faraday::Utils
- Faraday::Utils::Headers
- Faraday::Utils::ParamsHash
- EmHttpSslPatch
- Object

No matching classes.

# Faraday::Adapter

Public: This is a base class for all Faraday adapters. Adapters are responsible for fulfilling a Faraday request.

### Constants

CONTENT_LENGTH

### Public Instance Methods

call(env) click to toggle source

    # File lib/faraday/adapter.rb, line 33
    def call(env)
      env.clear_body if env.needs_body?
    end

save_response(env, status, body, headers = nil) click to toggle source

    # File lib/faraday/adapter.rb, line 37
    def save_response(env, status, body, headers = nil)
      env.status = status
      env.body = body
      env.response_headers = Utils::Headers.new.tap do |response_headers|
        response_headers.update headers unless headers.nil?
        yield(response_headers) if block_given?
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.