@pushrocks/webrequest
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -5,3 +5,3 @@ /** | ||
export declare class WebRequest { | ||
getJson(urlArg: string | string[], requestBody?: any): Promise<any>; | ||
getJson(urlArg: string | string[]): Promise<any>; | ||
/** | ||
@@ -18,3 +18,3 @@ * postJson | ||
*/ | ||
deleteJson(urlArg: string, requestBody?: any): Promise<any>; | ||
deleteJson(urlArg: string): Promise<any>; | ||
/** | ||
@@ -21,0 +21,0 @@ * a fault tolerant request |
@@ -15,5 +15,4 @@ "use strict"; | ||
class WebRequest { | ||
async getJson(urlArg, requestBody) { | ||
async getJson(urlArg) { | ||
const response = await this.request(urlArg, { | ||
body: requestBody, | ||
method: 'GET' | ||
@@ -29,3 +28,3 @@ }); | ||
body: requestBody, | ||
method: 'GET' | ||
method: 'POST' | ||
}); | ||
@@ -40,3 +39,3 @@ return response.json(); | ||
body: requestBody, | ||
method: 'GET' | ||
method: 'PUT' | ||
}); | ||
@@ -48,5 +47,4 @@ return response.json(); | ||
*/ | ||
async deleteJson(urlArg, requestBody) { | ||
async deleteJson(urlArg) { | ||
const response = await this.request(urlArg, { | ||
body: requestBody, | ||
method: 'GET' | ||
@@ -115,2 +113,2 @@ }); | ||
exports.WebRequest = WebRequest; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQSw4REFBZ0Q7QUFFaEQ7O0dBRUc7QUFDSCxNQUFhLFVBQVU7SUFDZCxLQUFLLENBQUMsT0FBTyxDQUFDLE1BQXlCLEVBQUUsV0FBaUI7UUFDL0QsTUFBTSxRQUFRLEdBQWEsTUFBTSxJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRTtZQUNwRCxJQUFJLEVBQUUsV0FBVztZQUNqQ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0sQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFDO2dCQUNqRCw0Q0FBNEM7Z0JBQzVDLE9BQU8sTUFBTSxTQUFTLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUM7YUFDL0M7UUFDSCxDQUFDLENBQUM7UUFFRixNQUFNLGFBQWEsR0FBYSxNQUFNLFNBQVMsQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQztRQUN0RSxPQUFPLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQzNCLE9BQU8sYUFBYSxDQUFDO0lBQ3ZCLENBQUM7Q0FDRjtBQTdHRCxnQ0E2R0MifQ== |
{ | ||
"name": "@pushrocks/webrequest", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "securely request from browsers", |
@@ -7,5 +7,4 @@ import * as plugins from './webrequest.plugins'; | ||
export class WebRequest { | ||
public async getJson(urlArg: string | string[], requestBody?: any) { | ||
public async getJson(urlArg: string | string[]) { | ||
const response: Response = await this.request(urlArg, { | ||
body: requestBody, | ||
method: 'GET' | ||
@@ -22,3 +21,3 @@ }); | ||
body: requestBody, | ||
method: 'GET' | ||
method: 'POST' | ||
}); | ||
@@ -34,3 +33,3 @@ return response.json(); | ||
body: requestBody, | ||
method: 'GET' | ||
method: 'PUT' | ||
}); | ||
@@ -43,5 +42,4 @@ return response.json(); | ||
*/ | ||
public async deleteJson(urlArg: string, requestBody?: any) { | ||
public async deleteJson(urlArg: string) { | ||
const response: Response = await this.request(urlArg, { | ||
body: requestBody, | ||
method: 'GET' | ||
@@ -48,0 +46,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15241
265