public class RequestLoggingFilter extends Object implements Filter
| Constructor and Description |
|---|
RequestLoggingFilter()
Logs to System.out
|
RequestLoggingFilter(LogDetail logDetail)
Logs with a specific detail to System.out
|
RequestLoggingFilter(LogDetail logDetail,
boolean shouldPrettyPrint,
PrintStream stream)
Instantiate a logger using a specific print stream and a specific log detail
|
RequestLoggingFilter(LogDetail logDetail,
PrintStream stream)
Instantiate a logger using a specific print stream and a specific log detail.
|
RequestLoggingFilter(PrintStream printStream)
Logs everyting to the specified printstream.
|
| Modifier and Type | Method and Description |
|---|---|
Response |
filter(FilterableRequestSpecification requestSpec,
FilterableResponseSpecification responseSpec,
FilterContext ctx)
Filter the incoming request and response specifications and outgoing response.
|
public RequestLoggingFilter()
public RequestLoggingFilter(LogDetail logDetail)
logDetail - The log detailpublic RequestLoggingFilter(PrintStream printStream)
printStream - The stream to log to.public RequestLoggingFilter(LogDetail logDetail, PrintStream stream)
logDetail - The log detailstream - The stream to log to.public RequestLoggingFilter(LogDetail logDetail, boolean shouldPrettyPrint, PrintStream stream)
logDetail - The log detailshouldPrettyPrint - true if pretty-printing of the body should occur.stream - The stream to log to.public Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx)
FilterFilterContext.next(com.jayway.restassured.specification.FilterableRequestSpecification, com.jayway.restassured.specification.FilterableResponseSpecification) when you're done otherwise the request will not be delivered.
It's of course possible to abort the filter chain execution by returning a Response directly.filter in interface FilterrequestSpec - The incoming request specresponseSpec - The incoming response specctx - The filter context. You need to call FilterContext.next(com.jayway.restassured.specification.FilterableRequestSpecification, com.jayway.restassured.specification.FilterableResponseSpecification) when you're done otherwise the request will not be delivered.Copyright © 2010–2014. All rights reserved.