Interface ValidatableResponse
public interface ValidatableResponse
-
Method Summary
Modifier and TypeMethodDescriptionstatic ValidatableResponsecreate(int statusCode) Creates a newValidatableResponseobject based on the passed parameters.static ValidatableResponseCreates a newValidatableResponseobject based on the passed parameters.static ValidatableResponseCreates a newValidatableResponseobject based on the passed parameters.static ValidatableResponseCreates a newValidatableResponseobject based on the passed parameters.getBody()int
-
Method Details
-
create
Creates a newValidatableResponseobject based on the passed parameters.- Parameters:
statusCode- The related status code- Returns:
- a
ValidatableResponseobject
-
create
Creates a newValidatableResponseobject based on the passed parameters.- Parameters:
statusCode- The related status codeheaders- The related headers- Returns:
- a
ValidatableResponseobject
-
create
Creates a newValidatableResponseobject based on the passed parameters.- Parameters:
statusCode- The related status codebody- The related bodycontentType- The related content type- Returns:
- a
ValidatableResponseobject - Throws:
IllegalArgumentException- in case body is passed without contentType.
-
create
static ValidatableResponse create(int statusCode, Map<String, String> headers, Buffer body, String contentType) Creates a newValidatableResponseobject based on the passed parameters.- Parameters:
statusCode- The related status codeheaders- The related headersbody- The related bodycontentType- The related content type- Returns:
- a
ValidatableResponseobject - Throws:
IllegalArgumentException- in case body is passed without contentType.
-
getHeaders
Map<String, ResponseParameter> getHeaders()- Returns:
- the header parameters.
-
getBody
ResponseParameter getBody()- Returns:
- the body.
-
getContentType
String getContentType() -
getStatusCode
int getStatusCode()
-