fix(deps): upgrade @push.rocks/webrequest to ^4.0.1 and adapt TypedRequest to new API
This commit is contained in:
@@ -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.'
|
||||
}
|
||||
|
||||
@@ -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