Constructor and Description |
---|
Client(Handler handler)
Creates a new
Client which will route HTTP requests to the
provided Handler using a RootContext allocated during
construction when none is provided. |
Client(Handler handler,
Context defaultContext)
|
Modifier and Type | Method and Description |
---|---|
Promise<Response,NeverThrowsException> |
send(Context context,
Request request)
Sends an HTTP request and returns a
Promise representing the
pending HTTP response. |
Promise<Response,NeverThrowsException> |
send(Request request)
Sends an HTTP request and returns a
Promise representing the
pending HTTP response. |
Promise<Response,NeverThrowsException> |
sendWithoutClose(Context context,
Request request)
Sends an HTTP request and returns a
Promise representing the
pending HTTP response. |
Promise<Response,NeverThrowsException> |
sendWithoutClose(Request request)
Sends an HTTP request and returns a
Promise representing the
pending HTTP response. |
public Client(Handler handler)
Client
which will route HTTP requests to the
provided Handler
using a RootContext
allocated during
construction when none is provided.handler
- The HTTP handler.public Client(Handler handler, Context defaultContext)
Client
which will route HTTP requests to the
provided Handler
using the specified Context
if none is provided.handler
- The HTTP handler.defaultContext
- The context to pass in with HTTP request when none is provided.public Promise<Response,NeverThrowsException> send(Request request)
Promise
representing the
pending HTTP response. The given request
is automatically closed on response reception.request
- The HTTP request to send.public Promise<Response,NeverThrowsException> send(Context context, Request request)
Promise
representing the
pending HTTP response. The given request
is automatically closed on response reception.context
- The associated processing context.request
- The HTTP request to send.public Promise<Response,NeverThrowsException> sendWithoutClose(Request request)
Promise
representing the
pending HTTP response.request
- The HTTP request to send.public Promise<Response,NeverThrowsException> sendWithoutClose(Context context, Request request)
Promise
representing the
pending HTTP response.context
- The associated processing context.request
- The HTTP request to send.Copyright © 2010-2018, ForgeRock All Rights Reserved.