Interface HTTPResponse
-
- All Implemented Interfaces:
public interface HTTPResponse
A response from an HTTP request.
-
-
Method Summary
Modifier and Type Method Description abstract HTTPRequest
getRequest()
The HTTPRequest of this response. abstract URL
getUrl()
The URL which was used to do the request to. abstract Map<String, String>
getHeaders()
The response headers received from the request. abstract Integer
getStatus()
The status code from the HTTP response message received from the request. abstract String
getStatusText()
The HTTP response message, if any, returned from a server. -
-
Method Detail
-
getRequest
abstract HTTPRequest getRequest()
The HTTPRequest of this response.
-
getUrl
abstract URL getUrl()
The URL which was used to do the request to.
Note that, in case of redirects it can be different from the original request URL.
-
getHeaders
abstract Map<String, String> getHeaders()
The response headers received from the request.
In case of multiple values per key, the values are comma separated.
-
getStatus
abstract Integer getStatus()
The status code from the HTTP response message received from the request.
From responses like HTTP/1.0 200 OK, extracts the number 200.
-
getStatusText
abstract String getStatusText()
The HTTP response message, if any, returned from a server.
From responses like HTTP/1.0 200 OK, extracts the Strings "OK".
Returns null if none could be discerned from the responses (the result was not valid HTTP).
-
-
-
-