Class ResponseDefinition
java.lang.Object
com.github.tomakehurst.wiremock.http.ResponseDefinition
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResponseDefinition(int status, String statusMessage, Body body, String bodyFileName, HttpHeaders headers, HttpHeaders additionalProxyRequestHeaders, List<String> removeProxyRequestHeaders, Integer fixedDelayMilliseconds, DelayDistribution delayDistribution, ChunkedDribbleDelay chunkedDribbleDelay, @Nullable String proxyBaseUrl, @Nullable org.wiremock.url.Path proxyUrlPrefixToRemove, Fault fault, List<String> transformers, Parameters transformerParameters, @Nullable org.wiremock.url.AbsoluteUrl browserProxyUrl, Boolean wasConfigured) ResponseDefinition(int status, String statusMessage, String body, com.fasterxml.jackson.databind.JsonNode jsonBody, String base64Body, String bodyFileName, HttpHeaders headers, HttpHeaders additionalProxyRequestHeaders, List<String> removeProxyRequestHeaders, Integer fixedDelayMilliseconds, DelayDistribution delayDistribution, ChunkedDribbleDelay chunkedDribbleDelay, String proxyBaseUrl, String proxyUrlPrefixToRemove, Fault fault, List<String> transformers, Parameters transformerParameters, Boolean wasConfigured) -
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseDefinitionbadRequest(Errors errors) static ResponseDefinitionbadRequestEntity(Errors errors) static ResponseDefinitionbrowserProxy(Request originalRequest) copy()static ResponseDefinitioncopyOf(ResponseDefinition original) static ResponseDefinitioncreated()boolean@NonNull HttpHeadersgetBody()@Nullable org.wiremock.url.AbsoluteUrlbyte[]byte[]getFault()@NonNull HttpHeaderscom.fasterxml.jackson.databind.JsonNode@Nullable String@Nullable org.wiremock.url.Pathint@NonNull ParametersinthashCode()booleanhasTransformer(Extension transformer) booleanstatic ResponseDefinitionstatic ResponseDefinitionstatic ResponseDefinitionstatic ResponseDefinitionnotFound()static ResponseDefinitionnotPermitted(Errors errors) static ResponseDefinitionnotPermitted(String message) static ResponseDefinitionok()static ResponseDefinitionstatic <T> ResponseDefinitionokForJson(T body) static ResponseDefinitionredirectTo(String path) static ResponseDefinitionbooleanbooleanbooleanbooleantoString()transform(Consumer<ResponseDefinition.Builder> transformer) boolean
-
Constructor Details
-
ResponseDefinition
public ResponseDefinition(int status, String statusMessage, String body, com.fasterxml.jackson.databind.JsonNode jsonBody, String base64Body, String bodyFileName, HttpHeaders headers, HttpHeaders additionalProxyRequestHeaders, List<String> removeProxyRequestHeaders, Integer fixedDelayMilliseconds, DelayDistribution delayDistribution, ChunkedDribbleDelay chunkedDribbleDelay, String proxyBaseUrl, String proxyUrlPrefixToRemove, Fault fault, List<String> transformers, Parameters transformerParameters, Boolean wasConfigured) -
ResponseDefinition
public ResponseDefinition(int status, String statusMessage, Body body, String bodyFileName, HttpHeaders headers, HttpHeaders additionalProxyRequestHeaders, List<String> removeProxyRequestHeaders, Integer fixedDelayMilliseconds, DelayDistribution delayDistribution, ChunkedDribbleDelay chunkedDribbleDelay, @Nullable String proxyBaseUrl, @Nullable org.wiremock.url.Path proxyUrlPrefixToRemove, Fault fault, List<String> transformers, Parameters transformerParameters, @Nullable org.wiremock.url.AbsoluteUrl browserProxyUrl, Boolean wasConfigured)
-
-
Method Details
-
notFound
-
ok
-
okEmptyJson
-
okForJson
-
created
-
noContent
-
badRequest
-
badRequestEntity
-
redirectTo
-
notConfigured
-
notAuthorised
-
notPermitted
-
notPermitted
-
serverError
-
browserProxy
-
copyOf
-
copy
-
transform
-
toBuilder
-
getHeaders
-
getAdditionalProxyRequestHeaders
-
getRemoveProxyRequestHeaders
-
getStatus
public int getStatus() -
getStatusMessage
-
getBody
-
getTextBody
-
getByteBody
public byte[] getByteBody() -
getByteBodyIfBinary
public byte[] getByteBodyIfBinary() -
getBase64Body
-
getReponseBody
-
getJsonBody
public com.fasterxml.jackson.databind.JsonNode getJsonBody() -
getBodyFileName
-
wasConfigured
public boolean wasConfigured() -
isFromConfiguredStub
-
getFixedDelayMilliseconds
-
getDelayDistribution
-
getChunkedDribbleDelay
-
getProxyBaseUrl
-
getProxyUrlPrefixToRemove
public @Nullable org.wiremock.url.Path getProxyUrlPrefixToRemove() -
specifiesBodyFile
public boolean specifiesBodyFile() -
specifiesBodyContent
public boolean specifiesBodyContent() -
specifiesTextBodyContent
public boolean specifiesTextBodyContent() -
specifiesBinaryBodyContent
public boolean specifiesBinaryBodyContent() -
isProxyResponse
public boolean isProxyResponse() -
getBrowserProxyUrl
public @Nullable org.wiremock.url.AbsoluteUrl getBrowserProxyUrl() -
getFault
-
getTransformers
-
getTransformerParameters
-
hasTransformer
-
equals
-
hashCode
public int hashCode() -
toString
-