org.mockserver.model
Class HttpError
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.model.Action
org.mockserver.model.HttpError
public class HttpError
- extends Action
- Author:
- jamesdbloom
| Nested classes/interfaces inherited from class org.mockserver.model.Action |
Action.Type |
HttpError
public HttpError()
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()
withDelay
public HttpError withDelay(Delay delay)
- The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)
- Parameters:
delay - a Delay object, for example new Delay(TimeUnit.SECONDS, 3)
withDelay
public HttpError withDelay(TimeUnit timeUnit,
long value)
- The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)
- Parameters:
timeUnit - a the time unit, for example TimeUnit.SECONDSvalue - a the number of time units to delay the response
getDelay
public Delay getDelay()
applyDelay
public HttpError applyDelay()
getType
public Action.Type getType()
- Specified by:
getType in class Action
Copyright © 2017. All rights reserved.