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

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

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

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.

Set the proxy for remote service.

Execute 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’.

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

Set the user for remote service.

[Validate]