diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index ff88936..8b57081 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/webrequest', - version: '3.0.5', + version: '3.0.6', description: 'securely request from browsers' } diff --git a/ts/index.ts b/ts/index.ts index 83125d8..38e07be 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -44,11 +44,12 @@ export class WebRequest { /** * postJson */ - public async postJson(urlArg: string, requestBody?: any, useStoreAsFallback: boolean = false) { + public async postJson(urlArg: string, requestBody?: any, useCacheArg: boolean = false) { await WebRequest.neededPolyfillsLoadedDeferred.promise; const response: Response = await this.request(urlArg, { body: plugins.smartjson.stringify(requestBody), method: 'POST', + useCache: useCacheArg }); const responseText = await response.text(); const responseResult = plugins.smartjson.parse(responseText);