UNPKG

rxdb-server

Version:
17 lines (16 loc) 593 B
// TODO this will be exported from the latest RxDB version on the next release // use that instead. export function customFetchWithFixedHeaders(headers) { function customFetch(url, options = {}) { // Ensure options object exists and headers property is initialized options.headers = { ...headers, // include default custom headers ...(options.headers || {}) // merge any headers passed in the function call }; // Call the original fetch with the modified options return fetch(url, options); } return customFetch; } //# sourceMappingURL=utils.js.map