Release 1.0
📐 Refactor
Section titled “📐 Refactor”- Update error handling to use
Cause.IllegalArgumentExceptionin Request, Response and Url processing functions (b210ab4) - ⚠️ Update
Request.Optionstype to be align withRequest.Partstype. (e1af448)
⚠️ Breaking Changes
Section titled “⚠️ Breaking Changes”- Update
Request.Optionstype to be align withRequest.Partstype. (e1af448)
How to migrate the breaking changes?
Section titled “How to migrate the breaking changes?”We simplified the Request.Options type by removing the nested init property. Here is how you can migrate your existing code:
const options: Request.Request.Options = { url: 'https://api.example.com/data', searchParams: { query: 'test', page: '1', }, init: { body: JSON.stringify({ key: 'value' }), cache: 'no-cache', credentials: 'include', headers: { 'Content-Type': 'application/json', 'X-Custom-Header': 'CustomValue', }, integrity: 'sha256-abcdef1234567890', keepalive: true, method: 'POST', mode: 'no-cors', priority: 'high', redirect: 'manual', referrer: 'https://example.eu', referrerPolicy: 'strict-origin-when-cross-origin', signal: new AbortController().signal, }};