Class: ActiveResource::Connection

Inherits:
Object
  • Object
show all
Includes:
VaucharAPI::Connection::RequestNotification, VaucharAPI::Connection::ResponseCapture
Defined in:
lib/active_resource/connection_ext.rb

Direct Known Subclasses

VaucharAPI::Connection

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from VaucharAPI::Connection::ResponseCapture

#handle_response

Methods included from VaucharAPI::Connection::RequestNotification

#notify_about_request, #request

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/active_resource/connection_ext.rb', line 6

def response
  @response
end

Instance Method Details

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



11
12
13
14
15
16
17
18
# File 'lib/active_resource/connection_ext.rb', line 11

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