github samchon/nestia v1.4.0

latest releases: v3.18.0, v3.17.0, v3.16.0...
16 months ago

IConnection type of @nestia/fetcher be changed like below.

From now on, you can fill option properties of fetch() function by configuring IConnection.IOptions type.

Thank @SeungjunWe for good idea and contribution.

nestia/packages/fetcher/src/IConnection.ts

Lines 68 to 136 in 87789c4

export interface IOptions {
/**
* A string indicating how the request will interact with the browser's
* cache to set request's cache.
*/
cache?:
| "default"
| "force-cache"
| "no-cache"
| "no-store"
| "only-if-cached"
| "reload";
/**
* A string indicating whether credentials will be sent with the request
* always, never, or only when sent to a same-origin URL. Sets request's
* credentials.
*/
credentials?: "omit" | "same-origin" | "include";
/**
* A cryptographic hash of the resource to be fetched by request.
*
* Sets request's integrity.
*/
integrity?: string;
/**
* A boolean to set request's keepalive.
*/
keepalive?: boolean;
/**
* A string to indicate whether the request will use CORS, or will be
* restricted to same-origin URLs.
*
* Sets request's mode.
*/
mode?: "cors" | "navigate" | "no-cors" | "same-origin";
/**
* A string indicating whether request follows redirects, results in
* an error upon encountering a redirect, or returns the redirect
* (in an opaque fashion).
*
* Sets request's redirect.
*/
redirect?: "error" | "follow" | "manual";
/**
* A string whose value is a same-origin URL, "about:client", or the
* empty string, to set request's referrer.
*/
referrer?: string;
/**
* A referrer policy to set request's referrerPolicy.
*/
referrerPolicy?:
| ""
| "no-referrer"
| "no-referrer-when-downgrade"
| "origin"
| "origin-when-cross-origin"
| "same-origin"
| "strict-origin"
| "strict-origin-when-cross-origin"
| "unsafe-url";
}

What's Changed

New Contributors

Full Changelog: v1.3.9...v1.4.0

Don't miss a new nestia release

NewReleases is sending notifications on new releases.