Module: NgpVan::Request

Included in:
Client
Defined in:
lib/ngp_van/request.rb

Instance Method Summary collapse

Instance Method Details

#delete(path:, params: {}) ⇒ Object

Perform an HTTP DELETE request



8
9
10
# File 'lib/ngp_van/request.rb', line 8

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

#get(path:, params: {}) ⇒ Object

Perform an HTTP GET request



13
14
15
# File 'lib/ngp_van/request.rb', line 13

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

#post(path:, body: {}) ⇒ Object

Perform an HTTP POST request



18
19
20
# File 'lib/ngp_van/request.rb', line 18

def post(path:, body: {})
  request(method: :post, path: path, body: body)
end

#put(path:, body: {}) ⇒ Object

Perform an HTTP PUT request



23
24
25
# File 'lib/ngp_van/request.rb', line 23

def put(path:, body: {})
  request(method: :put, path: path, body: body)
end