Expand description
HTTP utility constants and helpers
Re-exports§
pub use crate::utils::user_agent::get_user_agent;
Structs§
- Auth
Headers - Authentication headers for API requests
Functions§
- get_
auth_ headers - Get authentication headers for API requests Returns either OAuth headers for Max/Pro users or API key headers for regular users
- get_
mcp_ user_ agent - Get the user agent string for MCP requests
- get_
web_ fetch_ user_ agent - Get the user agent string for WebFetch requests
- with_
oauth_ 401_ retry - Wrapper that handles OAuth 401 errors by force-refreshing the token and retrying once. Addresses clock drift scenarios where the local expiration check disagrees with the server.