Class: RspecApiDocumentation::OAuth2MACClient

Inherits:
ClientBase
  • Object
show all
Includes:
WebMock::API
Defined in:
lib/rspec_api_documentation/oauth2_mac_client.rb

Defined Under Namespace

Classes: ProxyApp

Instance Attribute Summary collapse

Attributes inherited from ClientBase

#context, #options

Instance Method Summary collapse

Methods inherited from ClientBase

#delete, #get, #head, #patch, #post, #put, #response_status

Instance Attribute Details

#last_request=(value) ⇒ Object

Sets the attribute last_request

Parameters:

  • value

    the value to set the attribute last_request to.



20
21
22
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 20

def last_request=(value)
  @last_request = value
end

#last_response=(value) ⇒ Object

Sets the attribute last_response

Parameters:

  • value

    the value to set the attribute last_response to.



20
21
22
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 20

def last_response=(value)
  @last_response = value
end

Instance Method Details

#query_stringObject



31
32
33
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 31

def query_string
  last_request.env["QUERY_STRING"]
end

#request_content_typeObject



43
44
45
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 43

def request_content_type
  last_request.content_type
end

#request_headersObject



23
24
25
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 23

def request_headers
  env_to_headers(last_request.env)
end

#response_bodyObject



39
40
41
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 39

def response_body
  last_response.body
end

#response_content_typeObject



47
48
49
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 47

def response_content_type
  last_response.content_type
end

#response_headersObject



27
28
29
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 27

def response_headers
  last_response.headers
end

#statusObject



35
36
37
# File 'lib/rspec_api_documentation/oauth2_mac_client.rb', line 35

def status
  last_response.status
end