Class: VaucharAPI::Connection

Inherits:
ActiveResource::Connection show all
Includes:
RequestNotification, ResponseCapture
Defined in:
lib/vauchar_api/connection.rb

Defined Under Namespace

Modules: RequestNotification, ResponseCapture

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RequestNotification

#notify_about_request, #request

Methods included from ResponseCapture

#handle_response

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/vauchar_api/connection.rb', line 3

def response
  @response
end

Instance Method Details

#delete_with_body(path, body = "", headers = {}) ⇒ Object



5
6
7
8
9
10
# File 'lib/vauchar_api/connection.rb', line 5

def delete_with_body(path, body = "", headers = {})
  with_auth do
    headers = build_request_headers(headers, :delete, self.site.merge(path))
    HTTParty.delete("#{site.scheme}://#{site.host}:#{site.port}#{path}", { headers: headers, body: body })
  end
end