@cacheable/net 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +719 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +679 -1
- package/package.json +10 -10
package/dist/index.d.cts
CHANGED
|
@@ -290,6 +290,14 @@ declare class CacheableNet extends Hookified {
|
|
|
290
290
|
* @returns {Promise<DataResponse<T>>} The typed data and response from the fetch.
|
|
291
291
|
*/
|
|
292
292
|
delete<T = unknown>(url: string, data?: unknown, options?: Omit<NetFetchOptions, "method" | "body">): Promise<DataResponse<T>>;
|
|
293
|
+
/**
|
|
294
|
+
* Sets the Content-Type header if not already set.
|
|
295
|
+
* Checks both "Content-Type" and "content-type" to handle case variations.
|
|
296
|
+
* @param headers - The headers object to modify
|
|
297
|
+
* @param contentType - The content type to set (defaults to "application/json")
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
private setContentType;
|
|
293
301
|
}
|
|
294
302
|
declare const Net: typeof CacheableNet;
|
|
295
303
|
|
package/dist/index.d.ts
CHANGED
|
@@ -290,6 +290,14 @@ declare class CacheableNet extends Hookified {
|
|
|
290
290
|
* @returns {Promise<DataResponse<T>>} The typed data and response from the fetch.
|
|
291
291
|
*/
|
|
292
292
|
delete<T = unknown>(url: string, data?: unknown, options?: Omit<NetFetchOptions, "method" | "body">): Promise<DataResponse<T>>;
|
|
293
|
+
/**
|
|
294
|
+
* Sets the Content-Type header if not already set.
|
|
295
|
+
* Checks both "Content-Type" and "content-type" to handle case variations.
|
|
296
|
+
* @param headers - The headers object to modify
|
|
297
|
+
* @param contentType - The content type to set (defaults to "application/json")
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
private setContentType;
|
|
293
301
|
}
|
|
294
302
|
declare const Net: typeof CacheableNet;
|
|
295
303
|
|