Module: RubyKong::Request
- Defined in:
- lib/ruby-kong/request.rb,
lib/ruby-kong/request/api.rb,
lib/ruby-kong/request/node.rb,
lib/ruby-kong/request/plugin.rb,
lib/ruby-kong/request/consumer.rb
Defined Under Namespace
Modules: Api, Consumer, Node, Plugin
Class Method Summary
collapse
-
.delete(path, params = nil, headers = {}) ⇒ Object
-
.get(path, params = nil, headers = {}) ⇒ Object
-
.patch(path, params = nil, headers = {}) ⇒ Object
-
.post(path, params = nil, headers = {}) ⇒ Object
-
.put(path, params = nil, headers = {}) ⇒ Object
Class Method Details
.delete(path, params = nil, headers = {}) ⇒ Object
25
26
27
28
|
# File 'lib/ruby-kong/request.rb', line 25
def delete(path, params = nil, = {})
endpoint = RubyKong::Utils.endpoint_builder(path)
Unirest.delete(endpoint, :headers => , :parameters => params)
end
|
.get(path, params = nil, headers = {}) ⇒ Object
5
6
7
8
|
# File 'lib/ruby-kong/request.rb', line 5
def get(path, params = nil, = {})
endpoint = RubyKong::Utils.endpoint_builder(path)
Unirest.get(endpoint, :headers => , :parameters => params)
end
|
.patch(path, params = nil, headers = {}) ⇒ Object
20
21
22
23
|
# File 'lib/ruby-kong/request.rb', line 20
def patch(path, params = nil, = {})
endpoint = RubyKong::Utils.endpoint_builder(path)
Unirest.patch(endpoint, :headers => , :parameters => params)
end
|
.post(path, params = nil, headers = {}) ⇒ Object
10
11
12
13
|
# File 'lib/ruby-kong/request.rb', line 10
def post(path, params = nil, = {})
endpoint = RubyKong::Utils.endpoint_builder(path)
Unirest.post(endpoint, :headers => , :parameters => params)
end
|
.put(path, params = nil, headers = {}) ⇒ Object
15
16
17
18
|
# File 'lib/ruby-kong/request.rb', line 15
def put(path, params = nil, = {})
endpoint = RubyKong::Utils.endpoint_builder(path)
Unirest.put(endpoint, :headers => , :parameters => params)
end
|