Class

Connection

Extends:

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

Public Attributes
format
site
Public Methods
delete Execute a DELETE request (see HTTP protocol documentation if unfamiliar). Used to delete resources.
get Execute a GET request. Used to get (find) resources.
new The site parameter is required and will set the site attribute to the URI for the remote resource service.
post Execute a POST request. Used to create new resources.
put Execute a PUT request (see HTTP protocol documentation if unfamiliar). Used to update resources.
requests
site= Set URI for remote service.
Private Methods
authorization_header Sets authorization header; authentication information is pulled from credentials provided with site URI.
build_request_headers Builds headers for request to remote service.
default_header
handle_response Handles response and error codes from remote service.
http
http Creates new Net::HTTP instance for communication with remote service and resources.
logger
request Makes request to remote service.
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.