| Package | Description |
|---|---|
| org.mockserver.codec | |
| org.mockserver.model | |
| org.mockserver.serialization.model |
| Modifier and Type | Method and Description |
|---|---|
BodyWithContentType |
BodyDecoderEncoder.byteBufToBody(io.netty.buffer.ByteBuf content,
String contentTypeHeader) |
BodyWithContentType |
BodyDecoderEncoder.bytesToBody(byte[] bodyBytes,
String contentTypeHeader) |
BodyWithContentType |
BodyServletDecoderEncoder.servletRequestToBody(javax.servlet.http.HttpServletRequest servletRequest) |
| Modifier and Type | Class and Description |
|---|---|
class |
BinaryBody |
class |
JsonBody |
class |
LogEntryBody |
class |
StringBody |
class |
XmlBody |
| Modifier and Type | Method and Description |
|---|---|
BodyWithContentType |
HttpResponse.getBody() |
| Modifier and Type | Method and Description |
|---|---|
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));
| Modifier and Type | Method and Description |
|---|---|
abstract BodyWithContentType<?> |
BodyWithContentTypeDTO.buildObject() |
| Modifier and Type | Method and Description |
|---|---|
static BodyWithContentTypeDTO |
BodyWithContentTypeDTO.createWithContentTypeDTO(BodyWithContentType<?> body) |
Copyright © 2022. All rights reserved.