public class Response extends Object implements AutoCloseable
Client
.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the response and therefore releases all resources.
|
Map<String,List<String>> |
getAllHeaders()
Returns the headers of the response.
|
Map<String,String> |
getHeaders()
Deprecated.
since ep 10.0 (rev. 36486) as it cannot handle the case of multiple headers with the same name (case-sensitive) - this method will only
return the last value for such headers. Use
getAllHeaders() or getHeaderValues(String) instead. |
List<String> |
getHeaderValues(String headerName)
Returns the values of the header with the given name (case-insensitive) of the response.
|
JSONArray |
getJSONArrayResult()
Returns the result of the request as JSONArray
|
JSONObject |
getJSONObjectResult()
Returns the result of the request as JSONObject
|
String |
getRequestString()
get the request details this
Response originated from |
InputStream |
getResult()
Returns the result of the request as InputStream (e.g. needed if the result is a file)
|
int |
getStatusCode()
Returns the HTTP status code of the response (e.g. 200 for SUCCESS)
|
String |
getStatusMessage()
Returns the HTTP status message of the response
|
String |
getStringResult()
Returns the result of the request as string object
|
public void close()
close
in interface AutoCloseable
public int getStatusCode()
public String getStatusMessage()
public String getStringResult()
public JSONObject getJSONObjectResult()
public JSONArray getJSONArrayResult()
public InputStream getResult()
@Deprecated public Map<String,String> getHeaders()
getAllHeaders()
or getHeaderValues(String)
instead.public Map<String,List<String>> getAllHeaders()
getHeaderValues(String)
can be used.public List<String> getHeaderValues(String headerName)
headerName
- the name of the header which values shall be returned (name comparison is done case-insensitive)@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.