Package org.mockserver.model
Class HttpError
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.mockserver.model.Action
Action.Direction, Action.Type 
 - 
 
- 
Constructor Summary
Constructors Constructor Description HttpError() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpErrorerror()BooleangetDropConnection()byte[]getResponseBytes()Action.TypegetType()HttpErrorwithDropConnection(Boolean dropConnection)Forces the connection to be dropped without any response being returnedHttpErrorwithResponseBytes(byte[] responseBytes)The raw response to be returned, allowing the expectation to specify any invalid response as a raw byte[]- 
Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toString 
- 
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, key 
 - 
 
 - 
 
- 
- 
Method Detail
- 
error
public static HttpError error()
 
- 
withDropConnection
public HttpError withDropConnection(Boolean dropConnection)
Forces the connection to be dropped without any response being returned- Parameters:
 dropConnection- if true the connection is drop without any response being returned
 
- 
getDropConnection
public Boolean getDropConnection()
 
- 
withResponseBytes
public HttpError withResponseBytes(byte[] responseBytes)
The raw response to be returned, allowing the expectation to specify any invalid response as a raw byte[]- Parameters:
 responseBytes- the exact bytes that will be returned
 
- 
getResponseBytes
public byte[] getResponseBytes()
 
- 
getType
public Action.Type getType()
 
 - 
 
 -