com.jayway.restassured.filter
Interface FilterContext

All Known Implementing Classes:
FilterContextImpl

public interface FilterContext

Provides the functionality to set properties, sending requests and continue the filter chain.


Method Summary
 groovyx.net.http.Method getRequestMethod()
           
 String getRequestPath()
           
<T> T
getValue(String name)
          Get a value
 Response next(FilterableRequestSpecification request, FilterableResponseSpecification response)
          Continue to the next filter in the chain.
 Response send(RequestSender requestSender)
          Send a request to the same request path and with the same request method as the original request.
 void setValue(String name, Object value)
          Add a value that may be used be subsequent filters.
 

Method Detail

setValue

void setValue(String name,
              Object value)
Add a value that may be used be subsequent filters.

Parameters:
name - The name of the value
value - The value itself

getValue

<T> T getValue(String name)
Get a value

Type Parameters:
T - The type of the value
Parameters:
name - The name of the value
Returns:
The value itself or null if no value was found for the supplied name.

send

Response send(RequestSender requestSender)
Send a request to the same request path and with the same request method as the original request.

Parameters:
requestSender - The response or request specification.
Returns:
The response.

getRequestMethod

groovyx.net.http.Method getRequestMethod()
Returns:
The request method of the request (E.g. POST, GET etc)

getRequestPath

String getRequestPath()
Returns:
The request path

next

Response next(FilterableRequestSpecification request,
              FilterableResponseSpecification response)
Continue to the next filter in the chain.

Parameters:
request - The request specification
response - The response specification
Returns:
The response of the request


Copyright © 2010-2011. All Rights Reserved.