Interface HttpClientResponse
public interface HttpClientResponse
Representation of an HTTP response.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Returns anOptionalinput stream for the response body.Return the content-type header value.default List<HttpCookie>Get the parsed cookies from the "Set-Cookie" headerReturn aListof theHttpClientHeadersresponse header value.Location header value sent for redirects.default Optional<ObjectMetadataValue>Get the metadata related to the HTTP request sent.intReturns the status code for the request.Returns the status text for the request.
-
Field Details
-
LOCATION
- See Also:
-
SET_COOKIE
- See Also:
-
-
Method Details
-
getStatus
int getStatus()Returns the status code for the request.- Returns:
- The status code
-
getStatusText
Returns the status text for the request.- Returns:
- The status text
-
getHeaders
HttpClientHeaders getHeaders()Return aListof theHttpClientHeadersresponse header value.- Returns:
- the
Listof theHttpClientHeaders
-
getContentType
Return the content-type header value.- Returns:
- the content-type header value.
-
getBody
Optional<InputStream> getBody()Returns anOptionalinput stream for the response body. Note that you should not try to get this more than once, and that you should not close the stream.- Returns:
- The
Optionalinput stream
-
getLocation
Location header value sent for redirects. By default, this library will not follow redirects- Returns:
- the location header value
-
getCookies
Get the parsed cookies from the "Set-Cookie" header- Returns:
- the
Listof theHttpCookie
-
getMetadata
Get the metadata related to the HTTP request sent. (Useful to populate HTTP request metrics)- Returns:
- the metadata.
-