fix(core): update

This commit is contained in:
2022-05-29 21:01:56 +02:00
parent c2c1dee427
commit 63c6dac8fa
4 changed files with 11 additions and 11 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedrequest',
version: '2.0.5',
version: '2.0.6',
description: 'make typed requests towards apis'
}

View File

@ -37,7 +37,7 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
/**
* fires the request
*/
public async fire(fireArg: T['request']): Promise<T['response']> {
public async fire(fireArg: T['request'], useCacheArg: boolean = false): Promise<T['response']> {
const payload: plugins.typedRequestInterfaces.ITypedRequest = {
method: this.method,
request: fireArg,
@ -50,7 +50,7 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
let responseBody: plugins.typedRequestInterfaces.ITypedRequest;
if (this.urlEndPoint) {
const response = await webrequestInstance.postJson(this.urlEndPoint, payload);
const response = await webrequestInstance.postJson(this.urlEndPoint, payload, useCacheArg);
responseBody = response;
} else {
responseBody = await this.typedTarget.post(payload);