Skip to content

Release 1.0

  • Update error handling to use Cause.IllegalArgumentException in Request, Response and Url processing functions (b210ab4)
  • ⚠️ Update Request.Options type to be align with Request.Parts type. (e1af448)
  • Update Request.Options type to be align with Request.Parts type. (e1af448)

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,
}
};