Package | Description |
---|---|
org.mockserver.model | |
org.mockserver.serialization.java | |
org.mockserver.serialization.model |
Modifier and Type | Method and Description |
---|---|
static ConnectionOptions |
ConnectionOptions.connectionOptions() |
ConnectionOptions |
HttpResponse.getConnectionOptions() |
ConnectionOptions |
ConnectionOptions.withChunkSize(Integer chunkSize)
Specifies the size of chunks in a response:
|
ConnectionOptions |
ConnectionOptions.withCloseSocket(Boolean closeSocket)
Override whether the socket is closed after a response is sent:
if true the socket will always be closed,
if false the socket will never be closed,
if not set the socket will be closed unless the request received is HTTP 1.1 and contains a "Connection" header with a value of "keep-alive"
|
ConnectionOptions |
ConnectionOptions.withCloseSocketDelay(Delay closeSocketDelay)
Override how long to delay before closing socket, this value is ignored if socket isn't going to be closed
|
ConnectionOptions |
ConnectionOptions.withContentLengthHeaderOverride(Integer contentLengthHeaderOverride)
Override the "Content-Length" header with the specified amount, if not set the "Content-Length"
header will have a value determined by the length of the body
|
ConnectionOptions |
ConnectionOptions.withKeepAliveOverride(Boolean keepAliveOverride)
Override the "Connection" header:
if true the "Connection" header is specified with a value of "keep-alive"
if false the "Connection" header is specified with a value of "close"
if not set the "Connection" header will have a a value of "close" unless the request received is HTTP 1.1 and contains a "Connection" header with a value of "keep-alive"
|
ConnectionOptions |
ConnectionOptions.withSuppressConnectionHeader(Boolean suppressConnectionHeader)
Prevent a "Connection" header from being added to the response
|
ConnectionOptions |
ConnectionOptions.withSuppressContentLengthHeader(Boolean suppressContentLengthHeader)
Prevent a "Content-Length" header from being added to the response
|
Modifier and Type | Method and Description |
---|---|
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
|
Modifier and Type | Method and Description |
---|---|
String |
ConnectionOptionsToJavaSerializer.serialize(int numberOfSpacesToIndent,
ConnectionOptions connectionOptions) |
Modifier and Type | Method and Description |
---|---|
ConnectionOptions |
ConnectionOptionsDTO.buildObject() |
Constructor and Description |
---|
ConnectionOptionsDTO(ConnectionOptions connectionOptions) |
Copyright © 2020. All rights reserved.