Instance Methodasync-http-client 1.23.0AsyncHTTPClient
fail(reason:)
Cancels the request execution with a custom Error
.
func fail(reason error: Error)
Parameters
- reason
the error that is used to fail the promise
Other members in extension
Instance members
let eventLoop: EventLoop
The
EventLoop
the delegate will be executed on.var futureResult: EventLoopFuture<Response>
EventLoopFuture
for the response returned by this request.let logger: Logger
The
Logger
used by theTask
for logging.func cancel(
) Cancels the request execution.
func get(
) async throws -> Response Provides the result of this request.
func wait(
) throws -> Response Waits for execution of this request to complete.