fix(deps): upgrade @push.rocks/webrequest to ^4.0.1 and adapt TypedRequest to new API
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user