Package com.luciad.net.http
Class HttpResponse
java.lang.Object
com.luciad.net.http.HttpResponse
- All Implemented Interfaces:
AutoCloseable
An HTTP response.
An HttpResponse instance is built through an HttpResponse.Builder.
This class provides methods for accessing the response status code, headers and the response body.
- Since:
- 2023.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()getBody()Returns the body of this response.List<@NotNull HttpHeader> Returns the received response headers.intReturns the status code for this response.static HttpResponse.BuilderReturns the newHttpResponsebuilder.
-
Constructor Details
-
HttpResponse
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Returns the newHttpResponsebuilder.- Returns:
- the new
HttpResponsebuilder.
-
getBody
Returns the body of this response.- Returns:
- the body of this response.
-
getHeaders
Returns the received response headers.- Returns:
- the received response headers.
-
getStatusCode
public int getStatusCode()Returns the status code for this response.- Returns:
- the status code for this response.
-