Class Patron::Request
In: lib/patron/request.rb
Parent: Object

Represents the information necessary for an HTTP request. This is basically a data object with validation. Not all fields will be used in every request.

Methods

Constants

VALID_ACTIONS = [:get, :put, :post, :delete, :head, :copy]

Attributes

action  [R] 
auth_type  [RW] 
auth_type  [R] 
buffer_size  [R] 
connect_timeout  [R] 
file_name  [RW] 
headers  [R] 
insecure  [RW] 
max_redirects  [R] 
multipart  [RW] 
password  [RW] 
proxy  [RW] 
proxy_type  [RW] 
timeout  [R] 
url  [RW] 
username  [RW] 

Public Class methods

Public Instance methods

Set the type of authentication to use for this request.

@param [String, Symbol] type - The type of authentication to use for this request, can be one of

  :basic, :digest, or :any

@example

  sess.username = "foo"
  sess.password = "sekrit"
  sess.auth_type = :digest

[Validate]