Class: Updox::Connection
- Inherits:
-
Object
- Object
- Updox::Connection
- Includes:
- HTTParty
- Defined in:
- lib/updox/connection.rb
Instance Method Summary collapse
Instance Method Details
#request(endpoint: Updox::Models::Auth::PING_ENDPOINT, body: {}, headers: {}, auth: Updox::Models::Auth.new, required_auths: []) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/updox/connection.rb', line 11 def request(endpoint: Updox::Models::Auth::PING_ENDPOINT, body: {}, headers: {}, auth: Updox::Models::Auth.new, required_auths: []) if body.is_a?(Hash) body = auth_data(auth, required_auths).merge(body) body = body.to_json end self.class.post(endpoint, body: body, headers: headers) end |