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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
getBody()
Returns the body of this response.List
<@NotNull HttpHeader> Returns the received response headers.int
Returns the status code for this response.static HttpResponse.Builder
Returns the newHttpResponse
builder.
-
Constructor Details
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newBuilder
Returns the newHttpResponse
builder.- Returns:
- the new
HttpResponse
builder.
-
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.
-