pub async fn execute_request(
spec: &CachedSpec,
matches: &ArgMatches,
base_url: Option<&str>,
dry_run: bool,
idempotency_key: Option<&str>,
global_config: Option<&GlobalConfig>,
output_format: &OutputFormat,
jq_filter: Option<&str>,
cache_config: Option<&CacheConfig>,
) -> Result<(), Error>Expand description
Executes HTTP requests based on parsed CLI arguments and cached spec data.
This module handles the mapping from CLI arguments back to API operations, resolves authentication secrets, builds HTTP requests, and validates responses.
§Arguments
spec- The cached specification containing operation detailsmatches- Parsed CLI arguments from clapbase_url- Optional base URL override. If None, usesBaseUrlResolverdry_run- If true, show request details without executingidempotency_key- Optional idempotency key for safe retriesglobal_config- Optional global configuration for URL resolutionoutput_format- Format for response output (json, yaml, table)jq_filter- Optional JQ filter expression to apply to responsecache_config- Optional cache configuration for response caching
§Returns
Ok(())- Request executed successfully or dry-run completedErr(Error)- Request failed or validation error
§Errors
Returns errors for authentication failures, network issues, response validation, or JQ filter errors
§Panics
Panics if JSON serialization of dry-run information fails (extremely unlikely)