Package org.mockserver.model
Class FileBody
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.mockserver.model.BodyWithContentType
contentType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic FileBodystatic FileBodyfile(String filePath, HttpTemplate.TemplateType templateType) static FileBodystatic FileBodyfile(String filePath, MediaType contentType, HttpTemplate.TemplateType templateType) byte[]When set, the file contents are processed by the named template engine against the request before being returned as the response body.getValue()inthashCode()toString()Methods inherited from class org.mockserver.model.BodyWithContentType
getCharset, getContentTypeMethods inherited from class org.mockserver.model.Body
getOptional, getType, withOptionalMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
Constructor Details
-
FileBody
-
FileBody
-
FileBody
-
-
Method Details
-
file
-
file
-
file
public static FileBody file(String filePath, MediaType contentType, HttpTemplate.TemplateType templateType) -
file
-
getFilePath
-
getTemplateType
When set, the file contents are processed by the named template engine against the request before being returned as the response body. Whennullthe file is returned verbatim. -
getValue
-
getRawBytes
public byte[] getRawBytes()- Overrides:
getRawBytesin classBody<String>
-
toString
- Overrides:
toStringin classObjectWithJsonToString
-
equals
- Overrides:
equalsin classBodyWithContentType<String>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBodyWithContentType<String>
-