Class Typhoeus::Easy
In: lib/typhoeus/easy.rb
Parent: Object

Methods

Constants

CURLINFO_STRING = 1048576   These integer codes are available in curl/curl.h
OPTION_VALUES = { :CURLOPT_URL => 10002, :CURLOPT_HTTPGET => 80, :CURLOPT_HTTPPOST => 10024, :CURLOPT_UPLOAD => 46, :CURLOPT_CUSTOMREQUEST => 10036, :CURLOPT_POSTFIELDS => 10015, :CURLOPT_COPYPOSTFIELDS => 10165, :CURLOPT_POSTFIELDSIZE => 60, :CURLOPT_USERAGENT => 10018, :CURLOPT_TIMEOUT_MS => 155, # Time-out connect operations after this amount of milliseconds. # [Only works on unix-style/SIGALRM operating systems. IOW, does # not work on Windows. :CURLOPT_CONNECTTIMEOUT_MS => 156, :CURLOPT_INTERFACE => 10000 + 62, :CURLOPT_NOSIGNAL => 99, :CURLOPT_HTTPHEADER => 10023, :CURLOPT_FOLLOWLOCATION => 52, :CURLOPT_MAXREDIRS => 68, :CURLOPT_HTTPAUTH => 107, :CURLOPT_USERPWD => 10000 + 5, :CURLOPT_VERBOSE => 41, :CURLOPT_PROXY => 10004, :CURLOPT_PROXYUSERPWD => 10000 + 6, :CURLOPT_PROXYTYPE => 101, :CURLOPT_PROXYAUTH => 111, :CURLOPT_VERIFYPEER => 64, :CURLOPT_VERIFYHOST => 81, :CURLOPT_NOBODY => 44, :CURLOPT_ENCODING => 10000 + 102, :CURLOPT_SSLCERT => 10025, :CURLOPT_SSLCERTTYPE => 10086, :CURLOPT_SSLKEY => 10087, :CURLOPT_SSLKEYTYPE => 10088, :CURLOPT_SSLVERSION => 32, :CURLOPT_KEYPASSWD => 10026, :CURLOPT_CAINFO => 10065, :CURLOPT_CAPATH => 10097, }
INFO_VALUES = { :CURLINFO_RESPONSE_CODE => 2097154, :CURLINFO_TOTAL_TIME => 3145731, :CURLINFO_HTTPAUTH_AVAIL => 0x200000 + 23, :CURLINFO_EFFECTIVE_URL => 0x100000 + 1, :CURLINFO_PRIMARY_IP => 0x100000 + 32, :CURLINFO_NAMELOOKUP_TIME => 0x300000 + 4, :CURLINFO_CONNECT_TIME => 0x300000 + 5, :CURLINFO_PRETRANSFER_TIME => 0x300000 + 6, :CURLINFO_STARTTRANSFER_TIME => 0x300000 + 17, :CURLINFO_APPCONNECT_TIME => 0x300000 + 33, }
AUTH_TYPES = { :CURLAUTH_BASIC => 1, :CURLAUTH_DIGEST => 2, :CURLAUTH_GSSNEGOTIATE => 4, :CURLAUTH_NTLM => 8, :CURLAUTH_DIGEST_IE => 16, :CURLAUTH_AUTO => 16 | 8 | 4 | 2 | 1
PROXY_TYPES = { :CURLPROXY_HTTP => 0, :CURLPROXY_HTTP_1_0 => 1, :CURLPROXY_SOCKS4 => 4, :CURLPROXY_SOCKS5 => 5, :CURLPROXY_SOCKS4A => 6, }
SSL_VERSIONS = { :CURL_SSLVERSION_DEFAULT => 0, :CURL_SSLVERSION_TLSv1 => 1, :CURL_SSLVERSION_SSLv2 => 2, :CURL_SSLVERSION_SSLv3 => 3, :default => 0, :tlsv1 => 1, :sslv2 => 2, :sslv3 => 3

Attributes

curl_return_code  [R] 
headers  [R] 
method  [R] 
params  [R] 
response_body  [R] 
response_header  [R] 
ssl_version  [R] 
start_time  [RW] 
url  [R] 

Public Class methods

Public Instance methods

gets called when finished and response code is 300-599 or curl returns an error code

Set SSL CACERT " File holding one or more certificates to verify the peer with. "

Set CAPATH " directory holding multiple CA certificates to verify the peer with. The certificate directory must be prepared using the openssl c_rehash utility. "

Set SSL certificate " The string should be the file name of your certificate. " The default format is "PEM" and can be changed with ssl_cert_type=

Set SSL certificate type " The string should be the format of your certificate. Supported formats are "PEM" and "DER" "

Set SSL Key file " The string should be the file name of your private key. " The default format is "PEM" and can be changed with ssl_key_type=

Set SSL Key type " The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG". "

gets called when finished and response code is not 2xx, or curl returns an error code.

[Validate]