/** * Configuration for making HTTP requests using the native fetch API. * This replaces the AxiosRequestConfig interface from axios. * * @public */ export interface RequestConfig { /** * The server URL for the request. */ url?: string; /** * The HTTP method to be used when making the request. * @default 'get' */ method?: string; /** * Custom headers to be sent with the request. */ headers?: Record; /** * URL parameters to be sent with the request. * These will be serialized and appended to the URL. */ params?: Record; /** * Serializer for params (for compatibility with axios configs) */ paramsSerializer?: { encode?: (param: string) => string; serialize?: (params: Record, options?: any) => string; indexes?: boolean | null; }; /** * The data to be sent as the request body. * Applicable for 'PUT', 'POST', 'DELETE', and 'PATCH' methods. */ data?: any; /** * Maximum body length (for compatibility with axios configs) */ maxBodyLength?: number; /** * The number of milliseconds before the request times out. * @default 0 (no timeout) */ timeout?: number; /** * Whether to include credentials (cookies) in the request. * @default false */ withCredentials?: boolean; /** * An HTTP or HTTPS agent to be used when making the request. * Useful for proxy configuration. */ httpAgent?: any; /** * An HTTPS agent to be used when making the request. */ httpsAgent?: any; /** * The type of data expected in the response. * @default 'json' */ responseType?: 'json' | 'text' | 'arraybuffer' | 'blob'; }