Class: OAuth::RequestProxy::EventMachine::HttpRequest

### Home Classes Methods

### In Files

- lib/oauth/request_proxy/em_http_request.rb

### Parent

OAuth::RequestProxy::Base

### Methods

- #all_parameters
- #merged_parameters
- #method
- #parameters
- #post_parameters
- #query_parameters
- #uri

### Files

- LICENSE
- README.rdoc
- TODO

### Class/Module Index

Quicksearch

- OAuth
- OAuth::AccessToken
- OAuth::CLI
- OAuth::Client
- OAuth::Client::Helper
- OAuth::Consumer
- OAuth::ConsumerToken
- OAuth::Error
- OAuth::Helper
- OAuth::OAuthTestHelper
- OAuth::Problem
- OAuth::RequestProxy
- OAuth::RequestProxy::ActionControllerRequest
- OAuth::RequestProxy::Base
- OAuth::RequestProxy::Curl
- OAuth::RequestProxy::Curl::Easy
- OAuth::RequestProxy::EventMachine
- OAuth::RequestProxy::EventMachine::HttpRequest
- OAuth::RequestProxy::JabberRequest
- OAuth::RequestProxy::MockRequest
- OAuth::RequestProxy::Net
- OAuth::RequestProxy::Net::HTTP
- OAuth::RequestProxy::Net::HTTP::HTTPRequest
- OAuth::RequestProxy::RackRequest
- OAuth::RequestProxy::Typhoeus
- OAuth::RequestProxy::Typhoeus::Request
- OAuth::RequestProxy::UnknownRequestType
- OAuth::RequestToken
- OAuth::Server
- OAuth::ServerToken
- OAuth::Signature
- OAuth::Signature::Base
- OAuth::Signature::HMAC
- OAuth::Signature::HMAC::Base
- OAuth::Signature::HMAC::MD5
- OAuth::Signature::HMAC::RMD160
- OAuth::Signature::HMAC::SHA1
- OAuth::Signature::HMAC::SHA2
- OAuth::Signature::MD5
- OAuth::Signature::PLAINTEXT
- OAuth::Signature::RSA
- OAuth::Signature::RSA::SHA1
- OAuth::Signature::SHA1
- OAuth::Signature::UnknownSignatureMethod
- OAuth::Token
- OAuth::Unauthorized
- ActionController
- ActionController::Base
- ActionController::TestRequest
- Digest
- Digest::HMAC
- EventMachine
- EventMachine::HttpClient
- Net
- Net::HTTPGenericRequest
- Object
- String

No matching classes.

# OAuth::RequestProxy::EventMachine::HttpRequest

### Public Instance Methods

method() click to toggle source

Request in this con

    # File lib/oauth/request_proxy/em_http_request.rb, line 16
    def method
      request.method
    end

parameters() click to toggle source

    # File lib/oauth/request_proxy/em_http_request.rb, line 24
    def parameters
      if options[:clobber_request]
        options[:parameters]
      else
        all_parameters
      end
    end

uri() click to toggle source

    # File lib/oauth/request_proxy/em_http_request.rb, line 20
    def uri
      request.normalize_uri.to_s
    end

### Protected Instance Methods

all_parameters() click to toggle source

    # File lib/oauth/request_proxy/em_http_request.rb, line 34
    def all_parameters
      merged_parameters({}, post_parameters, query_parameters, options[:parameters])
    end

merged_parameters(params, *extra_params) click to toggle source

    # File lib/oauth/request_proxy/em_http_request.rb, line 52
    def merged_parameters(params, *extra_params)
      extra_params.compact.each do |params_pairs|
        params_pairs.each_pair do |key, value|
          if params.has_key?(key)
            params[key] += value
          else
            params[key] = [value].flatten
          end
        end
      end
      params
    end

post_parameters() click to toggle source

    # File lib/oauth/request_proxy/em_http_request.rb, line 42
    def post_parameters
      headers = request.options[:head] || {}
      form_encoded = headers['Content-Type'].to_s.downcase.start_with?("application/x-www-form-urlencoded")
      if ['POST', 'PUT'].include?(method) && form_encoded
        CGI.parse(request.normalize_body.to_s)
      else
        {}
      end
    end

query_parameters() click to toggle source

    # File lib/oauth/request_proxy/em_http_request.rb, line 38
    def query_parameters
      CGI.parse(request.normalize_uri.query.to_s)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.