fix(core): update
This commit is contained in:
parent
d4f022a2d9
commit
12dc003226
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/webrequest',
|
||||
version: '3.0.5',
|
||||
version: '3.0.6',
|
||||
description: 'securely request from browsers'
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user