Package com.inrupt.client
Interface Response<T>
-
- Type Parameters:
T
- the type of the response body
public interface Response<T>
An HTTP Response.This interface provides a generic API for interacting with HTTP responses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Response.BodyHandler<T>
An interface for mapping an HTTP response into a specific Java type.static class
Response.BodyHandlers
Convenience methods for creating commonResponse.BodyHandler
objects.static interface
Response.ResponseInfo
Initial response info supplied to aResponse.BodyHandler
before the body is processed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
body()
The body of the HTTP response.Headers
headers()
The headers from this HTTP response.int
statusCode()
The status code of an HTTP response.URI
uri()
The URI from which the response was received.
-
-
-
Method Detail
-
body
T body()
The body of the HTTP response.- Returns:
- the response body
-
headers
Headers headers()
The headers from this HTTP response.- Returns:
- the response headers
-
uri
URI uri()
The URI from which the response was received.- Returns:
- the response URI
-
statusCode
int statusCode()
The status code of an HTTP response.- Returns:
- the response code
-
-