ActiveResource::Connection


Files

Parent

Description

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

Methods

Constants

HTTP_FORMAT_HEADER_NAMES

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

Attributes

[RW] [R] [R] [R] [R]

Public Class methods

new (site, format = ActiveResource::Formats[:xml])

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

requests ()

Public Instance methods

delete (path, headers = {})

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

get (path, headers = {})

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

head (path, headers = {})

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

password= (password)

Set password for remote service.

post (path, body = '', headers = {})

Execute a POST request. Used to create new resources.

put (path, body = '', headers = {})

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

site= (site)

Set URI for remote service.

timeout= (timeout)

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

user= (user)

Set user for remote service.