Class: Grenache::Http::HttpClient
- Inherits:
-
Object
- Object
- Grenache::Http::HttpClient
- Includes:
- HTTParty
- Defined in:
- lib/grenache/http/http_client.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ HttpClient
constructor
A new instance of HttpClient.
- #request(uri, body, params = {}) ⇒ Object
Constructor Details
#initialize(config) ⇒ HttpClient
Returns a new instance of HttpClient.
6 7 8 |
# File 'lib/grenache/http/http_client.rb', line 6 def initialize config @config = config end |
Instance Method Details
#request(uri, body, params = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/grenache/http/http_client.rb', line 10 def request uri, body, params = {} = {body: body} if params[:timeout] [:timeout] = params[:timeout] else [:timeout] = timeout if timeout end if tls? [:pem] = pem [:ssl_ca_file] = ssl_ca_file end self.class.post uri, end |