Expand description
ArgMatches → HTTP request dispatch
Takes parsed clap matches and the matching ApiOperation, constructs an HTTP request, and returns the response.
§Three-phase dispatch
- Prepare –
PreparedRequest::from_operationresolves URL, parameters, headers, and authentication from anApiOperationand clap matches.build_bodyresolves the request body from--json/--fieldarguments. - Send –
PreparedRequest::sendtransmits the request and returns aSendResponsecontaining full response metadata (status, headers, body, elapsed time). - Consume –
SendResponse::into_jsonchecks the status code and parses the body as JSON.
The convenience function dispatch chains all three steps for callers that
don’t need the intermediate representations.
Structs§
- Prepared
Request - A fully resolved HTTP request ready to be sent or inspected.
- Send
Response - HTTP response from
PreparedRequest::send.
Enums§
- Auth
- Authentication method for API requests.
- Resolved
Auth - Owned authentication resolved from
Auth.
Functions§
- build_
body - Resolve the request body from
--json/--fieldclap arguments. - dispatch
- Execute an API operation based on clap matches.