Class Response
java.lang.Object
com.easypost.easyvcr.requestelements.HttpElement
com.easypost.easyvcr.requestelements.Response
Represents an HTTP response tracked by EasyVCR.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the EasyVCR headers to the response.getBody()Returns the body of the response.Returns the headers of the response.Returns the HttpVersion of the response.Returns the status of the response.getUri()Returns the URI of the response.Returns the URI of the response as a string.voidSets the body of the response.voidsetHeaders(Map<String,List<String>> headers)Sets the headers of the response.voidsetHttpVersion(String version)Sets the HTTP version of the response from a String.voidSets the status of the response.voidSets the URI of the response.voidsetUriString(String uriString)Sets the URI of the response from a string.Methods inherited from class com.easypost.easyvcr.requestelements.HttpElement
toJson
-
Constructor Details
-
Response
public Response()
-
-
Method Details
-
getBody
Returns the body of the response.- Returns:
- the body of the response
-
setBody
Sets the body of the response.- Parameters:
body- the body of the response
-
getHttpVersion
Returns the HttpVersion of the response.- Returns:
- the HttpVersion of the response
-
setHttpVersion
Sets the HTTP version of the response from a String.- Parameters:
version- the HTTP version of the response as a String
-
getHeaders
Returns the headers of the response.- Returns:
- the headers of the response
-
setHeaders
Sets the headers of the response.- Parameters:
headers- the headers of the response
-
addReplayHeaders
public void addReplayHeaders()Add the EasyVCR headers to the response. -
getStatus
Returns the status of the response.- Returns:
- the status of the response
-
setStatus
Sets the status of the response.- Parameters:
status- the status of the response
-
getUri
Returns the URI of the response.- Returns:
- the URI of the response
-
setUri
Sets the URI of the response.- Parameters:
uri- the URI of the response
-
getUriString
Returns the URI of the response as a string.- Returns:
- the URI of the response as a string
-
setUriString
Sets the URI of the response from a string.- Parameters:
uriString- the URI of the response as a string
-