fix(core): update
This commit is contained in:
parent
c2c1dee427
commit
63c6dac8fa
14
package-lock.json
generated
14
package-lock.json
generated
@ -14,7 +14,7 @@
|
||||
"@pushrocks/lik": "^6.0.0",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/webrequest": "^3.0.5"
|
||||
"@pushrocks/webrequest": "^3.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.63",
|
||||
@ -1020,9 +1020,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/webrequest": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-3.0.5.tgz",
|
||||
"integrity": "sha512-5maE1sMpL9KKULf6+gozkbziyzrnyTROYbc78ly77N01Nsjd1lJcEu8ELkPjp0I6nsrDUoJYP5+FfmuvR4Y6Yw==",
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-3.0.6.tgz",
|
||||
"integrity": "sha512-32OopKZKqwIRYgQ1zi2TBsWRQgCDkWvpKJktlRgb95LO9HGKy+Li7DYcpqgDl7nWqKGvJ0ykZrEWAMwiXFvLfw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
@ -7159,9 +7159,9 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/webrequest": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-3.0.5.tgz",
|
||||
"integrity": "sha512-5maE1sMpL9KKULf6+gozkbziyzrnyTROYbc78ly77N01Nsjd1lJcEu8ELkPjp0I6nsrDUoJYP5+FfmuvR4Y6Yw==",
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-3.0.6.tgz",
|
||||
"integrity": "sha512-32OopKZKqwIRYgQ1zi2TBsWRQgCDkWvpKJktlRgb95LO9HGKy+Li7DYcpqgDl7nWqKGvJ0ykZrEWAMwiXFvLfw==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartenv": "^5.0.2",
|
||||
|
@ -30,7 +30,7 @@
|
||||
"@pushrocks/lik": "^6.0.0",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/webrequest": "^3.0.5"
|
||||
"@pushrocks/webrequest": "^3.0.6"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@apiglobal/typedrequest',
|
||||
version: '2.0.5',
|
||||
version: '2.0.6',
|
||||
description: 'make typed requests towards apis'
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user