public class ResponseObject
Constructor and description |
---|
ResponseObject
() |
ResponseObject
(String responseText) |
Type Params | Return Type | Name and description |
---|---|---|
|
public ResponseObject |
clone() Creates and returns a copy of this ResponseObject with the following properties:
|
|
public String |
extractSOAPBodyAsContent() |
|
public HttpBodyContent |
getBodyContent() |
|
public String |
getContentCharset()
|
|
public String |
getContentDisposition() Get the content disposition |
|
public long |
getContentDownloadTime() |
|
public String |
getContentType() Get the content type |
|
public long |
getElapsedTime() |
|
public String |
getHeaderField(String name) |
|
public Map<String, List<String>> |
getHeaderFields() Get the header fields as a Map |
|
public String |
getResponseBodyContent() |
|
public long |
getResponseBodySize() |
|
public long |
getResponseHeaderSize() Returns headers size (byte) as long value of the response. |
|
public long |
getResponseSize() Returns size (byte) as long value of the response. |
|
public String |
getResponseText() Get the raw response text |
|
public int |
getStatusCode() Get the status code |
|
public long |
getWaitingTime() |
|
public boolean |
isJsonContentType() Check if the content type of this response is json |
|
public boolean |
isSOAPResponse() Check if this response is soap |
|
public boolean |
isTextContentType() Check if the content type of this response is raw text |
|
public boolean |
isXmlContentType() Check if the content type of this response is xml |
|
public void |
setBodyContent(HttpBodyContent bodyContent) |
|
public void |
setContentCharset(String contentCharset) |
|
public void |
setContentDisposition(String contentDisposition) Set the content disposition |
|
public void |
setContentDownloadTime(long contentDownloadTime) |
|
public void |
setContentType(String contentType) Set the content type |
|
public void |
setHeaderFields(Map<String, List<String>> headerFields) Set the header fields |
|
public void |
setResponseBodySize(long reponseBodySize) Returns body size (byte) as long value of the response. |
|
public void |
setResponseHeaderSize(long reponseHeaderSize) |
|
public void |
setResponseText(String responseText) Set the raw response text |
|
public void |
setStatusCode(int statusCode) Set the status code |
|
public void |
setWaitingTime(long waitingTime) |
|
public String |
toString() |
|
public void |
writeResponseBodyToFile(String absoluteFilePath) Writes the response body content to a file at the specified path. |
Creates and returns a copy of this ResponseObject with the following properties:
Get the content disposition
Get the content type
Get the header fields as a Map
Returns headers size (byte) as long value of the response.
Returns size (byte) as long value of the response. Response size = Header size + Body size
Get the raw response text
Get the status code
Check if the content type of this response is json
Check if this response is soap
Check if the content type of this response is raw text
Check if the content type of this response is xml
Set the content disposition
contentDisposition
- the new content dispositionSet the content type
contentType
- the new content typeSet the header fields
headerFields
- the new header fields as a MapReturns body size (byte) as long value of the response.
Set the raw response text
responseText
- the new raw response textSet the status code
statusCode
- the status codeWrites the response body content to a file at the specified path. If the file already exists, it will be overwritten.
This method handles both text and binary content types automatically based on the content type of the response. For text content, the file will be written using the character encoding specified by getContentCharset(). For binary content, the file will be written as raw bytes.
absoluteFilePath
- the absolute path where the file should be created and written to