lib/soaspec/exchange.rb in soaspec-0.1.9 vs lib/soaspec/exchange.rb in soaspec-0.1.10
- old
+ new
@@ -142,18 +142,23 @@
def to_s
test_name
end
# Returns response object from Api. Will make the request if not made and then cache it for later on
- # For example for SOAP it will be a Savon response
- # response.body (body of response as Hash)
- # response.header (head of response as Hash)
+ # @example For SOAP it will be a Savon response
+ # response.body (body of response as Hash)
+ # response.header (head of response as Hash)
def response
Soaspec.last_exchange = self
@response ||= make_request
end
alias call response
+
+ # Request of API call. Either intended request or actual request
+ def request
+ exchange_handler.request(@response)
+ end
# Get status code from api class. This is http response for Web Api
# @return [Integer] Status code from api class
def status_code
exchange_handler.status_code_for(response)
\ No newline at end of file