UNPKG

rxdb-server

Version:
23 lines (21 loc) 733 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.customFetchWithFixedHeaders = customFetchWithFixedHeaders; // TODO this will be exported from the latest RxDB version on the next release // use that instead. 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