Problem
The fetch utilities in src/util/fetch/ duplicate functionality that exists in other Neovici packages (e.g., @neovici/core).
Current State
cosmoz-queue has its own fetch wrapper with setBaseInit, fetch, json, jsonPost, etc.
- Similar utilities exist in other packages
Proposed Solution
Create a new public package (e.g., @neovici/fetch) containing:
setBaseInit with getHeaders callback support
fetch wrapper with header merging
handleJSON, json, jsonPost, jsonPut, jsonPatch, jsonDelete
RequestError class
- URL utilities
Benefits
- Single source of truth for fetch utilities
- Reusable across all Neovici packages
- Easier maintenance and consistent behavior
Problem
The fetch utilities in
src/util/fetch/duplicate functionality that exists in other Neovici packages (e.g.,@neovici/core).Current State
cosmoz-queuehas its own fetch wrapper withsetBaseInit,fetch,json,jsonPost, etc.Proposed Solution
Create a new public package (e.g.,
@neovici/fetch) containing:setBaseInitwithgetHeaderscallback supportfetchwrapper with header merginghandleJSON,json,jsonPost,jsonPut,jsonPatch,jsonDeleteRequestErrorclassBenefits