| Package | Description |
|---|---|
| org.mockserver.client.serialization.model | |
| org.mockserver.model |
| Modifier and Type | Method and Description |
|---|---|
abstract BodyWithContentType |
BodyWithContentTypeDTO.buildObject() |
| Modifier and Type | Method and Description |
|---|---|
static BodyWithContentTypeDTO |
BodyWithContentTypeDTO.createDTO(BodyWithContentType body) |
| Modifier and Type | Class and Description |
|---|---|
class |
BinaryBody |
class |
JsonBody |
class |
ParameterBody |
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));
Copyright © 2018. All rights reserved.