DebugRequest
An incoming debug API request handed to DebugTab.handle.
Constructed by the Lustro runtime, but the constructor is public so consumers can build instances directly in unit tests; call cancel there to simulate the runtime giving up on a request. The path is everything after /api/v1/<tab-id>/.
Constructors
Properties
The parsed Content-Type of the body, or null if absent/unparseable.
Whether the runtime has stopped waiting for this request: it outlived the per-request timeout, so the client already got a 504, or the debug server is shutting down. Whatever DebugTab.handle returns after that is discarded, so long-running work should check this and return early.
Query parameters, each name mapped to its ordered list of values.
Functions
Returns the request body decoded as a UTF-8 string, or null if there is no body.
Cancels this request: isCancelled turns true and every action registered with onCancel runs once, in registration order, on the calling thread. Later calls do nothing. If an action throws, the rest still run and the first failure is rethrown afterwards.
Parses an application/x-www-form-urlencoded body, as curl -d key=value and an HTML form send it, into each name mapped to its ordered list of values. Returns an empty map when the body has another content type, or none.
Returns the first value of the query parameter named name, or null if the parameter is absent or has no values.