Package org.stubit.http
Class StubbedResponse.Builder
java.lang.Object
org.stubit.http.StubbedResponse.Builder
- Enclosing class:
- StubbedResponse
A fluent API builder for
StubbedResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the body for the response.Adds a header that will be set in the response.statusCode(int statusCode) Sets the status code for the response and builds theStubbedResponse.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
body
Sets the body for the response.- Parameters:
body- that will be used for the response- Returns:
- this
-
header
Adds a header that will be set in the response.- Parameters:
name- header namevalue- header value or values- Returns:
- this
-
statusCode
Sets the status code for the response and builds theStubbedResponse.- Parameters:
statusCode- status code that will be used in the response- Returns:
- the built
StubbedResponse
-