Class LoggedResponse
- java.lang.Object
-
- com.github.tomakehurst.wiremock.http.LoggedResponse
-
public class LoggedResponse extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LoggedResponse(int status, HttpHeaders headers, java.lang.String bodyAsBase64, Fault fault, java.lang.String ignoredBodyOnlyUsedForBinding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggedResponse
from(Response response, Limit responseBodySizeLimit)
byte[]
getBody()
java.lang.String
getBodyAsBase64()
java.lang.String
getBodyAsString()
Retrieve body as a String encoded in the charset in the "Content-Type" header, or, if that's not present, the default character set (UTF-8)java.nio.charset.Charset
getCharset()
Fault
getFault()
HttpHeaders
getHeaders()
java.lang.String
getMimeType()
int
getStatus()
-
-
-
Constructor Detail
-
LoggedResponse
public LoggedResponse(int status, HttpHeaders headers, java.lang.String bodyAsBase64, Fault fault, java.lang.String ignoredBodyOnlyUsedForBinding)
-
-
Method Detail
-
from
public static LoggedResponse from(Response response, Limit responseBodySizeLimit)
-
getStatus
public int getStatus()
-
getHeaders
public HttpHeaders getHeaders()
-
getBodyAsString
public java.lang.String getBodyAsString()
Retrieve body as a String encoded in the charset in the "Content-Type" header, or, if that's not present, the default character set (UTF-8)- Returns:
- Encoded string
-
getMimeType
public java.lang.String getMimeType()
-
getCharset
public java.nio.charset.Charset getCharset()
-
getBody
public byte[] getBody()
-
getBodyAsBase64
public java.lang.String getBodyAsBase64()
-
getFault
public Fault getFault()
-
-