NAME

Unblock::HTTP::_ClientOperation - A pending outgoing HTTP request

DESCRIPTION

A Client request returns this handle immediately, including before its transport has connected. transaction() becomes the actual engine Transaction once the request is issued, without an HTTP transaction wrapper. For connect_websocket(), websocket() becomes the established Unblock::WebSocket::Client only after the protocol-specific handshake has been validated. With HTTP/1.1 the entire transport changes its input consumer and the HTTP transaction finishes at 101. With HTTP/2 or HTTP/3 the WebSocket remains on one multiplexed H2/H3 transaction until END_STREAM; on_finish reflects that transaction's eventual terminal state. HTTP/3 requires peer SETTINGS_ENABLE_CONNECT_PROTOCOL before dispatch and retains the original pending operation while waiting for QUIC bidirectional stream credit.

state() is queued, connecting, active, complete, error, or cancelled. error() reports a connection or transaction error, if any. is_terminal() and cancel() work before and after dispatch. An optional per-request positive timeout uses the framework timer; it does not create a blocking timer or another network queue.

Cancellation before dispatch never creates an engine Transaction. In that case on_finish is called with the operation handle, not a made-up Transaction. After dispatch all application transaction callbacks receive the actual engine Transaction.