Class: RspecApiDocumentation::HttpTestClient
- Inherits:
-
ClientBase
- Object
- Struct
- ClientBase
- RspecApiDocumentation::HttpTestClient
show all
- Defined in:
- lib/rspec_api_documentation/http_test_client.rb
Defined Under Namespace
Classes: LastRequest
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 ⇒ Object
Returns the value of attribute last_request.
28
29
30
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 28
def last_request
@last_request
end
|
#last_response ⇒ Object
Returns the value of attribute last_response.
28
29
30
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 28
def last_response
@last_response
end
|
Instance Method Details
#do_request(method, path, params, request_headers) ⇒ Object
60
61
62
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 60
def do_request(method, path, params, )
http_test_session.send(method, path, params, (method, path, params, ))
end
|
#query_string ⇒ Object
40
41
42
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 40
def query_string
last_request.url.query
end
|
#request_content_type ⇒ Object
52
53
54
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 52
def request_content_type
last_request.["CONTENT_TYPE"]
end
|
32
33
34
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 32
def
(last_request.)
end
|
#response_body ⇒ Object
48
49
50
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 48
def response_body
last_response.body
end
|
#response_content_type ⇒ Object
56
57
58
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 56
def response_content_type
last_response.["CONTENT_TYPE"]
end
|
36
37
38
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 36
def
last_response.
end
|
#status ⇒ Object
44
45
46
|
# File 'lib/rspec_api_documentation/http_test_client.rb', line 44
def status
last_response.status
end
|