Module: RestClient
- Defined in:
- lib/rest_client.rb,
lib/resource.rb,
lib/request_errors.rb
Overview
This module’s static methods are the entry point for using the REST client.
Defined Under Namespace
Classes: Redirect, Request, RequestFailed, RequestTimeout, Resource, ResourceNotFound, ServerBrokeConnection, Unauthorized
Class Method Summary collapse
- .delete(url, headers = {}) ⇒ Object
- .get(url, headers = {}) ⇒ Object
- .post(url, payload, headers = {}) ⇒ Object
- .put(url, payload, headers = {}) ⇒ Object
Class Method Details
.delete(url, headers = {}) ⇒ Object
29 30 31 32 33 |
# File 'lib/rest_client.rb', line 29 def self.delete(url, headers={}) Request.execute(:method => :delete, :url => url, :headers => headers) end |
.get(url, headers = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/rest_client.rb', line 9 def self.get(url, headers={}) Request.execute(:method => :get, :url => url, :headers => headers) end |