Modifier and Type | Method and Description |
---|---|
void |
WebSocketResponseCallback.handle(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
void |
ForwardChainExpectation.respond(HttpResponse httpResponse)
Return response when expectation is matched
|
Modifier and Type | Method and Description |
---|---|
HttpResponse |
NettyHttpClient.sendRequest(HttpRequest httpRequest,
long timeout,
TimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.SettableFuture<HttpResponse> |
NettyHttpClient.sendRequest(HttpRequest httpRequest) |
com.google.common.util.concurrent.SettableFuture<HttpResponse> |
NettyHttpClient.sendRequest(HttpRequest httpRequest,
InetSocketAddress remoteAddress) |
com.google.common.util.concurrent.SettableFuture<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) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
FullHttpResponseToMockServerResponse.mapMockServerResponseToFullHttpResponse(io.netty.handler.codec.http.FullHttpResponse fullHttpResponse) |
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 |
CORSHeaders.addCORSHeaders(HttpRequest request,
HttpResponse response) |
Modifier and Type | Field and Description |
---|---|
HttpResponse |
EchoServer.OnlyResponse.httpResponse |
Modifier and Type | Field and Description |
---|---|
Queue<HttpResponse> |
EchoServer.NextResponse.httpResponse |
Modifier and Type | Method and Description |
---|---|
EchoServer |
EchoServer.withNextResponse(HttpResponse... httpResponses) |
EchoServer |
EchoServer.withOnlyResponse(HttpResponse httpResponse) |
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) |
Modifier and Type | Method and Description |
---|---|
protected HttpResponse |
AbstractMockingIntegrationTestBase.makeRequest(HttpRequest httpRequest,
Collection<String> headersToIgnore) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
RequestResponseLogEntry.getHttpResponse() |
Constructor and Description |
---|
RequestResponseLogEntry(HttpRequest httpRequest,
HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
void |
MockServerResponseToHttpServletResponseEncoder.mapMockServerResponseToHttpServletResponse(HttpResponse httpResponse,
javax.servlet.http.HttpServletResponse httpServletResponse) |
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 |
HttpResponseActionHandler.handle(HttpResponse httpResponse) |
HttpResponse |
HttpResponseTemplateActionHandler.handle(HttpTemplate httpTemplate,
HttpRequest httpRequest) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.SettableFuture<HttpResponse> |
HttpForwardClassCallbackActionHandler.handle(HttpClassCallback httpClassCallback,
HttpRequest request) |
com.google.common.util.concurrent.SettableFuture<HttpResponse> |
HttpForwardActionHandler.handle(HttpForward httpForward,
HttpRequest httpRequest) |
com.google.common.util.concurrent.SettableFuture<HttpResponse> |
HttpOverrideForwardedRequestActionHandler.handle(HttpOverrideForwardedRequest httpOverrideForwardedRequest,
HttpRequest request) |
com.google.common.util.concurrent.SettableFuture<HttpResponse> |
HttpForwardTemplateActionHandler.handle(HttpTemplate httpTemplate,
HttpRequest originalRequest) |
protected com.google.common.util.concurrent.SettableFuture<HttpResponse> |
HttpForwardAction.sendRequest(HttpRequest httpRequest,
InetSocketAddress remoteAddress) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
HttpResponseActionHandler.handle(HttpResponse httpResponse) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
HttpResponse.clone() |
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.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,
com.google.common.net.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.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.withDelay(Delay delay)
The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)
|
HttpResponse |
HttpResponse.withDelay(TimeUnit timeUnit,
long value)
The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)
|
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(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 |
---|---|
protected void |
ResponseWriter.addConnectionHeader(HttpRequest request,
HttpResponse response) |
void |
NettyResponseWriter.writeResponse(HttpRequest request,
HttpResponse response,
boolean apiResponse) |
abstract void |
ResponseWriter.writeResponse(HttpRequest request,
HttpResponse response,
boolean apiResponse) |
Modifier and Type | Method and Description |
---|---|
void |
Scheduler.submit(com.google.common.util.concurrent.SettableFuture<HttpResponse> future,
Runnable command,
boolean synchronous) |
Modifier and Type | Method and Description |
---|---|
void |
ServletResponseWriter.writeResponse(HttpRequest request,
HttpResponse response,
boolean apiResponse) |
Modifier and Type | Method and Description |
---|---|
protected void |
MockServerResponseEncoder.encode(io.netty.channel.ChannelHandlerContext ctx,
HttpResponse response,
List<Object> out) |
io.netty.handler.codec.http.DefaultFullHttpResponse |
MockServerResponseEncoder.encode(HttpResponse response) |
Copyright © 2018. All rights reserved.