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

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

Methods

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

Constants

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

Attributes

format  [RW] 
password  [R] 
site  [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

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

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

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

Set password for remote service.

Execute a POST request. Used to create new resources.

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

Set URI for remote service.

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

Set user for remote service.

[Validate]