fix(deps): upgrade @push.rocks/webrequest to ^4.0.1 and adapt TypedRequest to new API

This commit is contained in:
2026-02-11 16:49:30 +00:00
parent 67dd2aac6c
commit 6d568d4e19
6 changed files with 61 additions and 13 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedrequest',
version: '4.0.0',
version: '3.2.6',
description: 'A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.'
}

View File

@@ -4,7 +4,7 @@ import { TypedResponseError } from './classes.typedresponseerror.js';
import { TypedRouter, type ITypedRequestLogEntry } from './classes.typedrouter.js';
import { TypedTarget } from './classes.typedtarget.js';
const webrequestInstance = new plugins.webrequest.WebRequest();
const webrequestInstance = new plugins.webrequest.WebrequestClient();
/**
* Helper to call global hooks from TypedRequest
@@ -120,7 +120,7 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
const response = await webrequestInstance.postJson(
this.urlEndPoint,
payloadSendingArg,
useCacheArg
useCacheArg ? { cacheStrategy: 'cache-first' } : {}
);
payloadReceiving = response;
} else {