Module: Peerindex::Request

Defined in:
lib/peerindex/request.rb

Overview

Defines HTTP request methods

Instance Method Summary collapse

Instance Method Details

#delete(path, params = {}, options = {}) ⇒ Object

Perform an HTTP DELETE request



19
20
21
# File 'lib/peerindex/request.rb', line 19

def delete(path, params={}, options={})
  request(:delete, path, params, options)
end

#get(path, params = {}, options = {}) ⇒ Object

Perform an HTTP GET request



5
6
7
# File 'lib/peerindex/request.rb', line 5

def get(path, params={}, options={})
  request(:get, path, params, options)
end

#post(path, params = {}, options = {}) ⇒ Object



9
10
11
# File 'lib/peerindex/request.rb', line 9

def post(path, params={}, options={})
  request(:post, path, params, options)
end

#put(path, params = {}, options = {}) ⇒ Object

Perform an HTTP PUT request



14
15
16
# File 'lib/peerindex/request.rb', line 14

def put(path, params={}, options={})
  request(:put, path, params, options)
end