Skip to main content

Module http

Module http 

Source
Expand description

HTTP utility constants and helpers

Re-exports§

pub use crate::utils::user_agent::get_user_agent;

Structs§

AuthHeaders
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.