Class RequestContextImpl
java.lang.Object
org.projectnessie.client.http.impl.RequestContextImpl
- All Implemented Interfaces:
RequestContext
-
Constructor Summary
ConstructorsConstructorDescriptionRequestContextImpl(HttpHeaders headers, URI uri, HttpClient.Method method, Object body) Construct a request context. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponseCallback(BiConsumer<ResponseContext, Exception> responseCallback) Adds a callback to be called when the request has finished.booleancontainsHeader(String name) getBody()getUri()booleanvoidvoidremoveHeader(String name) toString()
-
Constructor Details
-
RequestContextImpl
Construct a request context.- Parameters:
headers- map of all headersuri- uri of the requestmethod- verb to be usedbody- optional body of request
-
-
Method Details
-
putHeader
- Specified by:
putHeaderin interfaceRequestContext
-
containsHeader
- Specified by:
containsHeaderin interfaceRequestContext
-
removeHeader
- Specified by:
removeHeaderin interfaceRequestContext
-
getUri
- Specified by:
getUriin interfaceRequestContext
-
getMethod
- Specified by:
getMethodin interfaceRequestContext
-
getContentType
- Specified by:
getContentTypein interfaceRequestContext
-
getBody
- Specified by:
getBodyin interfaceRequestContext
-
isFormEncoded
public boolean isFormEncoded()- Specified by:
isFormEncodedin interfaceRequestContext
-
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.- Specified by:
addResponseCallbackin interfaceRequestContext- Parameters:
responseCallback- callback that receives either a non-nullResponseContextor a non-nullException.
-
getResponseCallbacks
- Specified by:
getResponseCallbacksin interfaceRequestContext
-
toString
-