Class ResponseDefinitionBuilder
java.lang.Object
com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder
- Direct Known Subclasses:
ResponseDefinitionBuilder.ProxyResponseDefinitionBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()protected ResponseDefinitionbuild(HttpHeaders additionalProxyRequestHeaders, List<String> removeProxyRequestHeaders, @Nullable org.wiremock.url.Path proxyUrlPrefixToRemove) but()static ResponseDefinitionjsonResponse(Object body) static ResponseDefinitionjsonResponse(Object body, int status) static ResponseDefinitionBuilderlike(ResponseDefinition responseDefinition) static <T> ResponseDefinitionBuilderstatic <T> ResponseDefinitionBuilderokForJson(T body) proxiedFrom(String proxyBaseUrl) static ResponseDefinitionBuilderwithBase64Body(String base64Body) withBody(byte[] body) withBodyFile(String fileName) withChunkedDribbleDelay(int numberOfChunks, int totalDuration) withFixedDelay(Integer milliseconds) withGzipDisabled(boolean gzipDisabled) withHeader(String key, String... values) withHeaders(HttpHeaders headers) withJsonBody(com.fasterxml.jackson.databind.JsonNode jsonBody) withLogNormalRandomDelay(double medianMilliseconds, double sigma) withLogNormalRandomDelay(double medianMilliseconds, double sigma, Double maxValue) withRandomDelay(DelayDistribution distribution) withResponseBody(Body body) withStatus(int status) withStatusMessage(String message) withTransformer(String transformerName, String parameterKey, Object parameterValue) withTransformerParameter(String name, Object value) withTransformerParameters(Map<String, Object> parameters) withTransformers(String... responseTransformerNames) withUniformRandomDelay(int lowerMilliseconds, int upperMilliseconds)
-
Field Details
-
builder
-
-
Constructor Details
-
ResponseDefinitionBuilder
public ResponseDefinitionBuilder()
-
-
Method Details
-
like
-
jsonResponse
-
jsonResponse
-
but
-
withStatus
-
withHeader
-
withBodyFile
-
withBody
-
withBody
-
withResponseBody
-
withJsonBody
-
withFixedDelay
-
withRandomDelay
-
withLogNormalRandomDelay
-
withLogNormalRandomDelay
public ResponseDefinitionBuilder withLogNormalRandomDelay(double medianMilliseconds, double sigma, Double maxValue) -
withUniformRandomDelay
public ResponseDefinitionBuilder withUniformRandomDelay(int lowerMilliseconds, int upperMilliseconds) -
withChunkedDribbleDelay
-
withTransformers
-
withTransformerParameters
-
withTransformerParameter
-
withTransformer
public ResponseDefinitionBuilder withTransformer(String transformerName, String parameterKey, Object parameterValue) -
proxiedFrom
-
withGzipDisabled
-
responseDefinition
-
okForJson
-
okForEmptyJson
-
withHeaders
-
withBase64Body
-
withStatusMessage
-
withFault
-
build
-
build
protected ResponseDefinition build(HttpHeaders additionalProxyRequestHeaders, List<String> removeProxyRequestHeaders, @Nullable org.wiremock.url.Path proxyUrlPrefixToRemove)
-