Object -
http
:
CookieClient
Provides the cookie functionality across HTTP client actions.
Constructor
__init
(string url, ClientConfiguration config, CookieConfig cookieConfig, HttpClient httpClient, CookieStore? cookieStore)
- url string
-
Target service URL
- config ClientConfiguration
-
HTTP Client Configuration to be used for the HTTP client invocation
- cookieConfig CookieConfig
-
Configurations associated with the cookies
- httpClient HttpClient
-
HTTP client for outbound HTTP requests
- cookieStore CookieStore?
-
Stores the cookies of the client
Methods
The CookieClient.get()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.post()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.head()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.put()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.forward()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.execute()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.patch()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.delete()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
The CookieClient.options()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Submits an HTTP request to a service with the specified HTTP verb.
The CookieClient.submit()
function does not produce a Response
as the result.
Rather, it returns an HttpFuture
, which can be used to do further interactions with the endpoint.
Retrieves the Response
for a previously-submitted request.
Checks whether a PushPromise
exists for a previously-submitted request.
Retrieves the next available PushPromise
for a previously-submitted request.
Retrieves the promised server push Response
message.
Rejects a PushPromise
. When a PushPromise
is rejected, there is no chance of fetching a promised
response using the rejected promise.
Fields
- url string
-
Target service URL
- config ClientConfiguration
-
HTTP Client Configuration to be used for the HTTP client invocation
- cookieConfig CookieConfig
-
Configurations associated with the cookies
- httpClient HttpClient
-
HTTP client for outbound HTTP requests
- cookieStore CookieStore? (default ())
-
Stores the cookies of the client
The CookieClient.get()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Request path
- message RequestMessage (default ())
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.post()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Resource path
- message RequestMessage
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.head()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Resource path
- message RequestMessage (default ())
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.put()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Resource path
- message RequestMessage
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.forward()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.execute()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- httpVerb string
-
HTTP verb value
- path string
-
Resource path
- message RequestMessage
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.patch()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Resource path
- message RequestMessage
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.delete()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Resource path
- message RequestMessage (default ())
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
The CookieClient.options()
function wraps the underlying HTTP remote functions in a way to provide
the cookie functionality for a given endpoint.
Parameters
- path string
-
Request path
- message RequestMessage (default ())
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response for the request or an
http:ClientError
if failed to establish communication with the upstream server
Submits an HTTP request to a service with the specified HTTP verb.
The CookieClient.submit()
function does not produce a Response
as the result.
Rather, it returns an HttpFuture
, which can be used to do further interactions with the endpoint.
Parameters
- httpVerb string
-
The HTTP verb value
- path string
-
The resource path
- message RequestMessage
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(HttpFuture | ClientError) An
HttpFuture
, which represents an asynchronous service invocation, or anClientError
if the submission fails
Retrieves the Response
for a previously-submitted request.
Parameters
- httpFuture HttpFuture
-
The
HttpFuture
relates to a previous asynchronous invocation
-
Return Type
(Response | ClientError) An HTTP response message or an
ClientError
if the invocation fails
Checks whether a PushPromise
exists for a previously-submitted request.
Parameters
- httpFuture HttpFuture
-
The
HttpFuture
related to a previous asynchronous invocation
-
Return Type
(boolean) A
boolean
, which represents whether aPushPromise
exists
Retrieves the next available PushPromise
for a previously-submitted request.
Parameters
- httpFuture HttpFuture
-
The
HttpFuture
related to a previous asynchronous invocation
-
Return Type
(PushPromise | ClientError) An HTTP Push Promise message or an
ClientError
if the invocation fails
Retrieves the promised server push Response
message.
Parameters
- promise PushPromise
-
The related
PushPromise
-
Return Type
(Response | ClientError) A promised HTTP
Response
message or anClientError
if the invocation fails
Rejects a PushPromise
. When a PushPromise
is rejected, there is no chance of fetching a promised
response using the rejected promise.
Parameters
- promise PushPromise
-
The Push Promise to be rejected