Package org.projectnessie.client.http
Interface RequestContext
- All Known Implementing Classes:
RequestContextImpl
public interface RequestContext
Context containing all important info about a request.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponseCallback(BiConsumer<ResponseContext, Exception> responseCallback) Adds a callback to be called when the request has finished.booleancontainsHeader(String name) default booleangetBody()getUri()booleanvoidvoidremoveHeader(String name)
-
Method Details
-
putHeader
-
containsHeader
-
removeHeader
-
getUri
URI getUri() -
getMethod
HttpClient.Method getMethod() -
getContentType
-
isFormEncoded
boolean isFormEncoded() -
getBody
-
doesOutput
default boolean doesOutput() -
addResponseCallback
Adds a callback to be called when the request has finished. TheresponseCallbackconsumeris called with a non-nullResponseContext, if the HTTP request technically succeeded. TheresponseCallbackconsumeris called with a non-nullExceptionobject, if the HTTP request technically failed.- Parameters:
responseCallback- callback that receives either a non-nullResponseContextor a non-nullException.
-
getResponseCallbacks
List<BiConsumer<ResponseContext,Exception>> getResponseCallbacks()
-