Class: Restspec::Endpoints::Request

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

Overview

A bag for request data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#endpointObject

Allows to set the endpoint used to generate this request.


6
7
8
# File 'lib/restspec/endpoints/request.rb', line 6

def endpoint
  @endpoint
end

#headersObject

Returns the value of attribute headers


4
5
6
# File 'lib/restspec/endpoints/request.rb', line 4

def headers
  @headers
end

#methodObject

Returns the value of attribute method


4
5
6
# File 'lib/restspec/endpoints/request.rb', line 4

def method
  @method
end

#payloadObject

Returns the value of attribute payload


4
5
6
# File 'lib/restspec/endpoints/request.rb', line 4

def payload
  @payload
end

#urlObject

Returns the value of attribute url


4
5
6
# File 'lib/restspec/endpoints/request.rb', line 4

def url
  @url
end

Instance Method Details

#raw_payloadString


9
10
11
# File 'lib/restspec/endpoints/request.rb', line 9

def raw_payload
  @raw_payload ||= (payload || '').to_json
end