Class: ZktClient::HttpClient
- Inherits:
-
Object
- Object
- ZktClient::HttpClient
- Defined in:
- lib/zkt_client/http_client.rb
Overview
HttpClient class handles HTTP requests for ZktClient
Class Method Summary collapse
-
.delete(url:, headers:) ⇒ Hash
Makes a DELETE HTTP request.
-
.get(url:, headers:, params: {}) ⇒ Hash
Makes a GET HTTP request.
-
.post(url:, params:, headers: {}) ⇒ Hash
Makes a POST HTTP request.
-
.put(url:, params:, headers:) ⇒ Hash
Makes a PUT HTTP request.
Class Method Details
.delete(url:, headers:) ⇒ Hash
Makes a DELETE HTTP request
44 45 46 |
# File 'lib/zkt_client/http_client.rb', line 44 def delete(url:, headers:) do_request(:delete, url, headers:) end |
.get(url:, headers:, params: {}) ⇒ Hash
Makes a GET HTTP request
15 16 17 |
# File 'lib/zkt_client/http_client.rb', line 15 def get(url:, headers:, params: {}) do_request(:get, url, params:, headers:) end |
.post(url:, params:, headers: {}) ⇒ Hash
Makes a POST HTTP request
25 26 27 |
# File 'lib/zkt_client/http_client.rb', line 25 def post(url:, params:, headers: {}) do_request(:post, url, body: params, headers:) end |
.put(url:, params:, headers:) ⇒ Hash
Makes a PUT HTTP request
35 36 37 |
# File 'lib/zkt_client/http_client.rb', line 35 def put(url:, params:, headers:) do_request(:put, url, body: params, headers:) end |