Package org.projectnessie.client.http
Interface ResponseContext
public interface ResponseContext
Interface for the important parts of a response. This is created after executing the request.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidClose the response context.Get the input stream for the response.Get the status of the response.default boolean
-
Method Details
-
getStatus
Status getStatus()Get the status of the response. -
getInputStream
Get the input stream for the response. Returns null if the response did not contain any readable entity.- Throws:
IOException
-
isJsonCompatibleResponse
default boolean isJsonCompatibleResponse() -
getContentType
String getContentType() -
getRequestedUri
URI getRequestedUri() -
close
Close the response context.- Parameters:
error- if the request failed, this is the exception that caused the failure; will be null otherwise
-