Class: Restspec::Endpoints::Network::HTTPartyNetworkAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/restspec/endpoints/network.rb

Instance Method Summary collapse

Instance Method Details

#request(request_object) ⇒ Object



26
27
28
29
30
31
32
33
34
35
# File 'lib/restspec/endpoints/network.rb', line 26

def request(request_object)
  response = HTTParty.send(
    request_object.method,
    request_object.url,
    headers: request_object.headers,
    body: request_object.raw_payload
  )

  [response.code, response.headers, response.body]
end