Modifier and Type | Method and Description |
---|---|
HttpResponse |
NettyHttpClient.sendRequest(HttpRequest httpRequest,
long timeout,
TimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<HttpResponse> |
NettyHttpClient.sendRequest(HttpRequest httpRequest) |
CompletableFuture<HttpResponse> |
NettyHttpClient.sendRequest(HttpRequest httpRequest,
InetSocketAddress remoteAddress) |
CompletableFuture<HttpResponse> |
NettyHttpClient.sendRequest(HttpRequest httpRequest,
InetSocketAddress remoteAddress,
Integer connectionTimeoutMillis) |
Modifier and Type | Method and Description |
---|---|
void |
HttpClientHandler.channelRead0(io.netty.channel.ChannelHandlerContext ctx,
HttpResponse response) |
void |
ForwardChainExpectation.respond(HttpResponse httpResponse)
Return response when expectation is matched
|
Modifier and Type | Method and Description |
---|---|
void |
WebSocketResponseCallback.handle(HttpResponse httpResponse) |
void |
WebSocketRequestCallback.handleError(HttpResponse httpResponse) |
boolean |
WebSocketClientRegistry.sendClientMessage(String clientId,
HttpRequest httpRequest,
HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
protected void |
MockServerToNettyResponseEncoder.encode(io.netty.channel.ChannelHandlerContext ctx,
HttpResponse response,
List<Object> out) |
Modifier and Type | Method and Description |
---|---|
void |
CORSHeaders.addCORSHeaders(HttpRequest request,
HttpResponse response) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
DashboardLogEntryDTO.getHttpResponse() |
Modifier and Type | Method and Description |
---|---|
DashboardLogEntryDTO |
DashboardLogEntryDTO.setHttpResponse(HttpResponse httpResponse) |
Modifier and Type | Field and Description |
---|---|
Queue<HttpResponse> |
EchoServer.NextResponse.httpResponse |
Modifier and Type | Method and Description |
---|---|
void |
EchoServer.withNextResponse(HttpResponse... httpResponses) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
LogEntry.getHttpResponse() |
HttpResponse |
LogEntry.getHttpUpdatedResponse() |
Modifier and Type | Method and Description |
---|---|
LogEntry |
LogEntry.setExpectation(HttpRequest httpRequest,
HttpResponse httpResponse) |
LogEntry |
LogEntry.setHttpResponse(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
FullHttpResponseToMockServerResponse.mapFullHttpResponseToMockServerResponse(io.netty.handler.codec.http.FullHttpResponse fullHttpResponse) |
Modifier and Type | Method and Description |
---|---|
void |
MockServerResponseToHttpServletResponseEncoder.mapMockServerResponseToHttpServletResponse(HttpResponse httpResponse,
javax.servlet.http.HttpServletResponse httpServletResponse) |
List<io.netty.handler.codec.http.DefaultHttpObject> |
MockServerHttpResponseToFullHttpResponse.mapMockServerResponseToNettyResponse(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
Expectation.getHttpResponse() |
HttpResponse |
HttpStateHandler.retrieve(HttpRequest request) |
Modifier and Type | Method and Description |
---|---|
Expectation |
Expectation.thenRespond(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
HttpResponseClassCallbackActionHandler.handle(HttpClassCallback httpClassCallback,
HttpRequest request) |
HttpResponse |
ExpectationResponseCallback.handle(HttpRequest httpRequest)
Called for every request when expectation condition has been satisfied.
|
HttpResponse |
ExpectationForwardAndResponseCallback.handle(HttpRequest httpRequest,
HttpResponse httpResponse)
Called for every response received from a proxied request, the return
value is the returned by MockServer.
|
HttpResponse |
HttpResponseActionHandler.handle(HttpResponse httpResponse) |
HttpResponse |
HttpResponseTemplateActionHandler.handle(HttpTemplate httpTemplate,
HttpRequest httpRequest) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<HttpResponse> |
HttpForwardActionResult.getHttpResponse() |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
ExpectationForwardAndResponseCallback.handle(HttpRequest httpRequest,
HttpResponse httpResponse)
Called for every response received from a proxied request, the return
value is the returned by MockServer.
|
HttpResponse |
HttpResponseActionHandler.handle(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
protected HttpForwardActionResult |
HttpForwardAction.sendRequest(HttpRequest request,
InetSocketAddress remoteAddress,
Function<HttpResponse,HttpResponse> overrideHttpResponse) |
protected HttpForwardActionResult |
HttpForwardAction.sendRequest(HttpRequest request,
InetSocketAddress remoteAddress,
Function<HttpResponse,HttpResponse> overrideHttpResponse) |
HttpForwardActionResult |
HttpForwardActionResult.setHttpResponse(CompletableFuture<HttpResponse> httpResponse) |
Constructor and Description |
---|
HttpForwardActionResult(HttpRequest httpRequest,
CompletableFuture<HttpResponse> httpResponse,
Function<HttpResponse,HttpResponse> overrideHttpResponse) |
HttpForwardActionResult(HttpRequest httpRequest,
CompletableFuture<HttpResponse> httpResponse,
Function<HttpResponse,HttpResponse> overrideHttpResponse) |
HttpForwardActionResult(HttpRequest httpRequest,
CompletableFuture<HttpResponse> httpResponse,
Function<HttpResponse,HttpResponse> overrideHttpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
HttpResponse.clone() |
HttpResponse |
HttpRequestAndHttpResponse.getHttpResponse() |
HttpResponse |
LogEventRequestAndResponse.getHttpResponse() |
HttpResponse |
HttpOverrideForwardedRequest.getHttpResponse() |
static HttpResponse |
HttpResponse.notFoundResponse()
Static builder to create a not found response.
|
HttpResponse |
HttpResponse.removeHeader(NottableString name) |
HttpResponse |
HttpResponse.removeHeader(String name) |
HttpResponse |
HttpResponse.replaceHeader(Header header)
Update header to return as a Header object, if a header with
the same name already exists it will be modified
|
HttpResponse |
HttpResponse.replaceHeader(String name,
String... values)
Update header to return as a Header object, if a header with
the same name already exists it will be modified
|
static HttpResponse |
HttpResponse.response()
Static builder to create a response.
|
static HttpResponse |
HttpResponse.response(String body)
Static builder to create a response with a 200 status code and the string response body.
|
HttpResponse |
HttpResponse.update(HttpResponse replaceResponse) |
HttpResponse |
HttpResponse.withBody(BodyWithContentType body)
Set the body to return for example:
string body:
- exact(" a simple string body");
or
- new StringBody(" | a simple string body")
binary body:
- binary(IOUtils.readFully(getClass().getClassLoader().getResourceAsStream("example.pdf"), 1024));
or
- new BinaryBody(IOUtils.readFully(getClass().getClassLoader().getResourceAsStream("example.pdf"), 1024));
HttpResponse |
HttpResponse.withBody(byte[] body)
Set response body to return as binary such as a pdf or image
|
HttpResponse |
HttpResponse.withBody(String body)
Set response body to return as a string response body.
|
HttpResponse |
HttpResponse.withBody(String body,
Charset charset)
Set response body to return a string response body with the specified encoding.
|
HttpResponse |
HttpResponse.withBody(String body,
MediaType contentType)
Set response body to return a string response body with the specified encoding.
|
HttpResponse |
HttpResponse.withConnectionOptions(ConnectionOptions connectionOptions)
The connection options for override the default connection behaviour, this allows full control of headers such
as "Connection" or "Content-Length" or controlling whether the socket is closed after the response has been sent
|
HttpResponse |
HttpResponse.withContentType(MediaType mediaType) |
HttpResponse |
HttpResponse.withCookie(Cookie cookie)
Add cookie to return as Set-Cookie header
|
HttpResponse |
HttpResponse.withCookie(NottableString name,
NottableString value)
Adds one cookie to match on or to not match on using the NottableString, each NottableString can either be a positive matching value,
such as string("match"), or a value to not match on, such as not("do not match"), the string values passed to the NottableString
can be a plain string or a regex (for more details of the supported regex syntax see
http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html)
|
HttpResponse |
HttpResponse.withCookie(String name,
String value)
Add cookie to return as Set-Cookie header
|
HttpResponse |
HttpResponse.withCookies(Cookie... cookies)
The cookies to return as Set-Cookie headers as a varargs of Cookie objects
|
HttpResponse |
HttpResponse.withCookies(Cookies cookies) |
HttpResponse |
HttpResponse.withCookies(List<Cookie> cookies)
The cookies to return as Set-Cookie headers as a list of Cookie objects
|
HttpResponse |
HttpResponse.withHeader(Header header)
Add a header to return as a Header object, if a header with
the same name already exists this will NOT be modified but
two headers will exist
|
HttpResponse |
HttpResponse.withHeader(NottableString name,
NottableString... values)
Add a header to return as a Header object, if a header with
the same name already exists this will NOT be modified but
two headers will exist
|
HttpResponse |
HttpResponse.withHeader(String name,
String... values)
Add a header to return as a Header object, if a header with
the same name already exists this will NOT be modified but
two headers will exist
|
HttpResponse |
HttpResponse.withHeaders(Header... headers)
The headers to return as a varargs of Header objects
|
HttpResponse |
HttpResponse.withHeaders(Headers headers) |
HttpResponse |
HttpResponse.withHeaders(List<Header> headers)
The headers to return as a list of Header objects
|
HttpResponse |
HttpResponse.withReasonPhrase(String reasonPhrase)
The reason phrase to return, if no reason code is returned this will
be defaulted to the standard reason phrase for the statusCode,
i.e.
|
HttpResponse |
HttpResponse.withStatusCode(Integer statusCode)
The status code to return, such as 200, 404, the status code specified
here will result in the default status message for this status code for
example for 200 the status message "OK" is used
|
Modifier and Type | Method and Description |
---|---|
static HttpOverrideForwardedRequest |
HttpOverrideForwardedRequest.forwardOverriddenRequest(HttpRequest httpRequest,
HttpResponse httpResponse)
Static builder which will allow overriding proxied request with the specified request.
|
HttpResponse |
HttpResponse.update(HttpResponse replaceResponse) |
HttpRequestAndHttpResponse |
HttpRequestAndHttpResponse.withHttpResponse(HttpResponse httpResponse) |
LogEventRequestAndResponse |
LogEventRequestAndResponse.withHttpResponse(HttpResponse httpResponse) |
HttpOverrideForwardedRequest |
HttpOverrideForwardedRequest.withHttpResponse(HttpResponse httpResponse)
All fields, headers, cookies, etc of the provided response will be overridden
|
Modifier and Type | Method and Description |
---|---|
void |
NettyResponseWriter.writeResponse(HttpRequest request,
HttpResponse response,
boolean apiResponse) |
Modifier and Type | Method and Description |
---|---|
protected HttpResponse |
ResponseWriter.addConnectionHeader(HttpRequest request,
HttpResponse response) |
Modifier and Type | Method and Description |
---|---|
protected HttpResponse |
ResponseWriter.addConnectionHeader(HttpRequest request,
HttpResponse response) |
abstract void |
ResponseWriter.writeResponse(HttpRequest request,
HttpResponse response,
boolean apiResponse) |
Modifier and Type | Method and Description |
---|---|
void |
Scheduler.submit(HttpForwardActionResult future,
BiConsumer<HttpResponse,Throwable> consumer,
boolean synchronous) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
HttpResponseSerializer.deserialize(String jsonHttpResponse) |
HttpResponse[] |
HttpResponseSerializer.deserializeArray(String jsonHttpResponses) |
Modifier and Type | Method and Description |
---|---|
Class<HttpResponse> |
HttpResponseSerializer.supportsType() |
Modifier and Type | Method and Description |
---|---|
String |
HttpResponseSerializer.serialize(HttpResponse... httpResponses) |
String |
HttpResponseSerializer.serialize(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
String |
HttpResponseSerializer.serialize(List<HttpResponse> httpResponses) |
Modifier and Type | Method and Description |
---|---|
String |
HttpResponseToJavaSerializer.serialize(int numberOfSpacesToIndent,
HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
HttpResponseDTO.buildObject() |
Constructor and Description |
---|
HttpResponseDTO(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
void |
HttpResponseSerializer.serialize(HttpResponse httpResponse,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
Modifier and Type | Method and Description |
---|---|
void |
ServletResponseWriter.writeResponse(HttpRequest request,
HttpResponse response,
boolean apiResponse) |
Modifier and Type | Field and Description |
---|---|
static HttpResponse |
PrecannedTestExpectationResponseCallback.httpResponse |
static HttpResponse |
StaticTestExpectationResponseCallback.httpResponse |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
PrecannedTestExpectationResponseCallback.handle(HttpRequest httpRequest) |
HttpResponse |
StaticTestExpectationResponseCallback.handle(HttpRequest httpRequest) |
HttpResponse |
PrecannedTestExpectationForwardCallbackRequestAndResponse.handle(HttpRequest httpRequest,
HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
PrecannedTestExpectationForwardCallbackRequestAndResponse.handle(HttpRequest httpRequest,
HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
protected HttpResponse |
AbstractMockingIntegrationTestBase.makeRequest(HttpRequest httpRequest,
Collection<String> headersToIgnore) |
Copyright © 2020. All rights reserved.