@dbs-portal/core-api
Version:
HTTP client and API utilities for DBS Portal
28 lines • 983 B
TypeScript
/**
* Helper utilities for MSW testing in Node.js environment
* This file helps ensure that MSW correctly intercepts network requests
*/
/**
* Standard headers to include in all fetch requests to ensure MSW intercepts them
* The 'X-MSW-Bypass: no' header helps MSW with localhost resolution issues
*/
export declare const MSW_HEADERS: {
'X-MSW-Bypass': string;
};
/**
* Create headers with MSW interception support
* @param additionalHeaders Additional headers to include in the request
* @returns Headers object with MSW interception support
*/
export declare function createMSWHeaders(additionalHeaders?: {}): HeadersInit;
/**
* Base URL for API requests
*/
export declare const API_BASE_URL = "http://localhost:3000";
/**
* Create full URL for API requests
* @param path Path to API endpoint (with or without leading slash)
* @returns Full URL with API base
*/
export declare function createApiUrl(path: string): string;
//# sourceMappingURL=msw-utils.d.ts.map