Class: HttpClient

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/telerb/utils/http_client.rb

Overview

Class responsability for http services

Instance Method Summary collapse

Instance Method Details

#get(url, options = nil) ⇒ Object



7
8
9
# File 'lib/telerb/utils/http_client.rb', line 7

def get(url, options = nil)
  self.class.get(url, query: options)
end

#post(url, options, headers = nil) ⇒ Object



11
12
13
# File 'lib/telerb/utils/http_client.rb', line 11

def post(url, options, headers = nil)
  self.class.post(url, body: options, headers: headers)
end