Module: Faraday

### Home Classes Methods

### In Files

- lib/faraday/adapter/em_http.rb
- lib/faraday/adapter/em_synchrony/parallel_manager.rb
- lib/faraday/adapter/em_synchrony.rb
- lib/faraday/adapter/excon.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/adapter.rb
- lib/faraday/builder.rb
- lib/faraday/connection.rb
- lib/faraday/error.rb
- lib/faraday/middleware.rb
- lib/faraday/request/authorization.rb
- lib/faraday/request/basic_authentication.rb
- lib/faraday/request/multipart.rb
- lib/faraday/request/retry.rb
- lib/faraday/request/token_authentication.rb
- lib/faraday/request/url_encoded.rb
- lib/faraday/request.rb
- lib/faraday/response/logger.rb
- lib/faraday/response/raise_error.rb
- lib/faraday/response.rb
- lib/faraday/upload_io.rb
- lib/faraday/utils.rb
- lib/faraday.rb

### Namespace

- MODULE Faraday::AutoloadHelper
- MODULE Faraday::Error
- MODULE Faraday::MiddlewareRegistry
- MODULE Faraday::Utils
- CLASS Faraday::Adapter
- CLASS Faraday::Builder
- CLASS Faraday::CompositeReadIO
- CLASS Faraday::Connection
- CLASS Faraday::Middleware
- CLASS Faraday::Request
- CLASS Faraday::Response

### Methods

- ::default_connection
- ::new
- ::register_middleware
- ::require_lib
- ::require_libs

### 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::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::Builder
- Faraday::Builder::Handler
- Faraday::Builder::StackLocked
- Faraday::CompositeReadIO
- Faraday::Connection
- Faraday::Error
- Faraday::Error::ClientError
- Faraday::Error::ConnectionFailed
- Faraday::Error::MissingDependency
- Faraday::Error::ParsingError
- Faraday::Error::ResourceNotFound
- Faraday::Error::TimeoutError
- Faraday::Middleware
- Faraday::MiddlewareRegistry
- Faraday::Request
- Faraday::Request::Authorization
- Faraday::Request::BasicAuthentication
- Faraday::Request::Multipart
- Faraday::Request::Retry
- Faraday::Request::TokenAuthentication
- Faraday::Request::UrlEncoded
- Faraday::Response
- Faraday::Response::Logger
- Faraday::Response::Middleware
- Faraday::Response::RaiseError
- Faraday::Utils
- Faraday::Utils::Headers
- Faraday::Utils::ParamsHash
- Object

No matching classes.

# Faraday

Rely on autoloading instead of explicit require; helps avoid the "already initialized constant" warning on Ruby 1.8.7 when NetHttp is refereced below. require 'faraday/adapter/net_http'

### Constants

Parts
Timer
UploadIO
VERSION

### Attributes

default_adapter[RW]
default_connection[W]
lib_path[RW]
root_path[RW]

### Public Class Methods

default_connection() click to toggle source

    # File lib/faraday.rb, line 32
    def self.default_connection
      @default_connection ||= Connection.new
    end

new(url = nil, options = {}) click to toggle source

    # File lib/faraday.rb, line 9
    def new(url = nil, options = {})
      block = block_given? ? Proc.new : nil
      Faraday::Connection.new(url, options, &block)
    end

register_middleware(type, mapping = nil) click to toggle source

Public: register middleware classes under a short name.

type - A Symbol specifying the kind of middleware (default: :middleware) mapping - A Hash mapping Symbol keys to classes. Classes can be expressed

    as fully qualified constant, or a Proc that will be lazily called
    to return the former.

Examples

    Faraday.register_middleware :aloha => MyModule::Aloha
    Faraday.register_middleware :response, :boom => MyModule::Boom

    # shortcuts are now available in Builder:
    builder.use :aloha
    builder.response :boom

Returns nothing.

    # File lib/faraday.rb, line 114
    def self.register_middleware type, mapping = nil
      type, mapping = :middleware, type if mapping.nil?
      component = self.const_get(type.to_s.capitalize)
      component.register_middleware(mapping)
    end

require_lib(*libs) click to toggle source
Alias for: require_libs
require_libs(*libs) click to toggle source

    # File lib/faraday.rb, line 14
    def require_libs(*libs)
      libs.each do |lib|
        require "#{lib_path}/#{lib}"
      end
    end

Also aliased as: require_lib

[Validate]

Generated with the Darkfish Rdoc Generator 2.