Interface HttpResponse
-
- All Superinterfaces:
AutoCloseable
public interface HttpResponse extends AutoCloseable
Represents an HTTP response message.- Since:
- 4.0.0
- Author:
- Dmytro Nosan
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the current response.HttpHeadersgetHeaders()Gets the headers of this response.InputStreamgetInputStream()The HTTP response body.intgetStatus()Gets the HTTP response status.URIgetUri()Gets the URI of the response.
-
-
-
Method Detail
-
getUri
URI getUri()
Gets the URI of the response.- Returns:
- the URI of the response
-
getStatus
int getStatus()
Gets the HTTP response status.- Returns:
- the status
-
getHeaders
HttpHeaders getHeaders()
Gets the headers of this response.- Returns:
- a corresponding HttpHeaders object
-
getInputStream
InputStream getInputStream() throws IOException
The HTTP response body.- Returns:
- the body
- Throws:
IOException- an I/O error occurs
-
close
void close() throws IOExceptionClose the current response.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- an I/O error occurs
-
-