com.jayway.restassured.specification
Interface ResponseLogSpecification

All Superinterfaces:
LogSpecification<ResponseSpecification>
All Known Implementing Classes:
ResponseLogSpecificationImpl

public interface ResponseLogSpecification
extends LogSpecification<ResponseSpecification>

The response logging specification


Method Summary
 ResponseSpecification ifError()
          Logs everything only if an error occurs (status code >= 400).
 ResponseSpecification ifStatusCodeIsEqualTo(int statusCode)
          Logs everything only if if the status code is equal to statusCode.
 ResponseSpecification ifStatusCodeMatches(org.hamcrest.Matcher<Integer> matcher)
          Logs everything only if if the status code matches the supplied matcher
 ResponseSpecification status()
          Logs only the status line (includes the status code)
 
Methods inherited from interface com.jayway.restassured.specification.LogSpecification
all, all, body, body, cookies, everything, everything, headers
 

Method Detail

status

ResponseSpecification status()
Logs only the status line (includes the status code)

Returns:
The response specification

ifError

ResponseSpecification ifError()
Logs everything only if an error occurs (status code >= 400).

Returns:
The response specification

ifStatusCodeIsEqualTo

ResponseSpecification ifStatusCodeIsEqualTo(int statusCode)
Logs everything only if if the status code is equal to statusCode.

Parameters:
statusCode - The status code
Returns:
The response specification

ifStatusCodeMatches

ResponseSpecification ifStatusCodeMatches(org.hamcrest.Matcher<Integer> matcher)
Logs everything only if if the status code matches the supplied matcher

Parameters:
matcher - The hamcrest matcher
Returns:
The response specification


Copyright © 2010-2012. All Rights Reserved.