Class ActiveResource::Connection
In: lib/active_resource/http_mock.rb
lib/active_resource/connection.rb
Parent: Object

Class to handle connections to remote web services. This class is used by ActiveResource::Base to interface with REST services.

Methods

auth_type=   delete   get   head   new   password=   post   proxy=   put   requests   site=   ssl_options=   timeout=   user=  

Constants

HTTP_FORMAT_HEADER_NAMES = { :get => 'Accept', :put => 'Content-Type', :post => 'Content-Type', :delete => 'Accept', :head => 'Accept'

Attributes

auth_type  [R] 
format  [RW] 
password  [R] 
proxy  [R] 
site  [R] 
ssl_options  [R] 
timeout  [R] 
user  [R] 

Public Class methods

The site parameter is required and will set the site attribute to the URI for the remote resource service.

Public Instance methods

Sets the auth type for remote service.

Executes a DELETE request (see HTTP protocol documentation if unfamiliar). Used to delete resources.

Executes a GET request. Used to get (find) resources.

Executes a HEAD request. Used to obtain meta-information about resources, such as whether they exist and their size (via response headers).

Sets the password for remote service.

Executes a POST request. Used to create new resources.

Set the proxy for remote service.

Executes a PUT request (see HTTP protocol documentation if unfamiliar). Used to update resources.

Set URI for remote service.

Hash of options applied to Net::HTTP instance when site protocol is ‘https’.

Sets the number of seconds after which HTTP requests to the remote service should time out.

Sets the user for remote service.

[Validate]