NAME
Linux::Event::HTTP::Client::Operation - lifecycle of one high-level HTTP client operation
DESCRIPTION
A Client::Operation is the application-facing handle returned by Linux::Event::HTTP::Client. It normally contains one Linux::Event::HTTP::Transaction, and can contain more when redirects are followed or authentication challenges are retried.
A Transaction still means exactly one Request/Response exchange. Redirect or authentication retry therefore creates another Transaction rather than replacing the Request or Response inside an existing Transaction.
For operations that need only one exchange, request, response, request_body, cancel, and the terminal-state predicates provide the same convenient high-level access to that Transaction.
METHODS
transaction
Returns the current or final Transaction.
transactions
Returns the Transactions in exchange order.
transaction_count
Returns the number of Transactions created by this operation, including redirect and authentication-retry exchanges.
initial_url
Returns the absolute URL supplied for the first exchange.
url
Returns the current or final absolute URL.
urls
Returns the absolute URL associated with each Transaction in exchange order. Authentication retries therefore repeat the same URL.
redirect_count
Returns the number of followed redirects. Authentication retries do not increment this count.
auth_retry_count
Returns the number of automatic 401/407 authentication retries performed by the operation.
max_redirects
Returns the redirect limit selected for this operation.
max_auth_retries
Returns the authentication retry limit selected for this operation.
request
Returns the Request for the current or final Transaction.
response
Returns the Response for the current or final Transaction, or undef before a Response exists.
request_body
Delegates to the current Transaction's outgoing Request body producer. This keeps the ordinary streaming-upload form concise while leaving producer ownership on Transaction.
cancel
Cancels the active Transaction, if any, and marks the overall client operation cancelled.
state
Returns pending, active, complete, cancelled, or error.
is_complete, is_cancelled, is_terminal
Report operation lifecycle state.
error
Returns the terminal operation error, if any.