From 35b3ff8021a77ae0f865cf9fe38f5ce216af386c Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 15 Feb 2019 12:39:29 +0100 Subject: [PATCH] fix(now supports request body): update --- ts/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/index.ts b/ts/index.ts index 8af5f47..4e82942 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -26,6 +26,7 @@ export class WebRequest { urlArg: string | string[], optionsArg: { method: 'GET' | 'POST' | 'PUT' | 'DELETE'; + body?: any; } ) { let allUrls: string[]; @@ -70,7 +71,8 @@ export class WebRequest { method: optionsArg.method, headers: { 'Content-Type': 'application/json' - } + }, + body: optionsArg.body }); console.log(`${urlToUse} answers with status: ${response.status}`);