Method: Redox::Connection#request
- Defined in:
- lib/redox/connection.rb
#request(endpoint: DEFAULT_ENDPOINT, body: nil, headers: {}, auth: true) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/redox/connection.rb', line 13 def request(endpoint: DEFAULT_ENDPOINT, body: nil, headers: {}, auth: true) body = body.to_json if body.is_a?(Hash) headers = auth_header.merge(headers) if auth self.class.post(endpoint, body: body, headers: headers) end |