Package | Description |
---|---|
org.mockserver.model |
Modifier and Type | Method and Description |
---|---|
static MediaType |
MediaType.create(String type,
String subType) |
static MediaType |
MediaType.parse(String mediaTypeHeader) |
MediaType |
MediaType.withCharset(Charset charset) |
MediaType |
MediaType.withCharset(String charset) |
Modifier and Type | Method and Description |
---|---|
static BinaryBody |
BinaryBody.binary(byte[] body,
MediaType contentType) |
static StringBody |
StringBody.exact(String body,
MediaType contentType) |
boolean |
MediaType.isCompatible(MediaType other) |
static JsonBody |
JsonBody.json(Object object,
MediaType contentType) |
static JsonBody |
JsonBody.json(Object object,
MediaType contentType,
MatchType matchType) |
static JsonBody |
JsonBody.json(String json,
MediaType contentType) |
static JsonBody |
JsonBody.json(String json,
MediaType contentType,
MatchType matchType) |
static StringBody |
StringBody.subString(String body,
MediaType contentType) |
HttpResponse |
HttpResponse.withBody(String body,
MediaType contentType)
Set response body to return a string response body with the specified encoding.
|
T |
HttpMessage.withContentType(MediaType mediaType) |
HttpRequest |
HttpRequest.withContentType(MediaType mediaType) |
HttpResponse |
HttpResponse.withContentType(MediaType mediaType) |
static XmlBody |
XmlBody.xml(String xml,
MediaType contentType) |
Constructor and Description |
---|
BinaryBody(byte[] bytes,
MediaType contentType) |
BodyWithContentType(Body.Type type,
MediaType contentType) |
JsonBody(String json,
byte[] rawBytes,
MediaType contentType,
MatchType matchType) |
StringBody(String value,
byte[] rawBytes,
boolean subString,
MediaType contentType) |
StringBody(String value,
MediaType contentType) |
XmlBody(String xml,
byte[] rawBytes,
MediaType contentType) |
XmlBody(String xml,
MediaType contentType) |
Copyright © 2020. All rights reserved.