From 3c4393408110ecef63ceb64a9b375f77cb23e630 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 10 Nov 2023 15:32:43 -0500 Subject: [PATCH] Set default http request method --- playlet-lib/src/source/services/HttpClient.bs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playlet-lib/src/source/services/HttpClient.bs b/playlet-lib/src/source/services/HttpClient.bs index fcbcec49..6bc2fa6b 100644 --- a/playlet-lib/src/source/services/HttpClient.bs +++ b/playlet-lib/src/source/services/HttpClient.bs @@ -61,6 +61,7 @@ namespace HttpClient function new() m._timeoutSeconds = 30 m._tryCount = 1 + m._method = "GET" end function function Method(method as string) as HttpRequest @@ -249,9 +250,6 @@ namespace HttpClient else if m._method = "HEAD" m._sent = m.urlTransfer.AsyncHead() else - if StringUtils.IsNullOrEmpty(m._method) - throw "Http request method not set" - end if m.urlTransfer.SetRequest(m._method) body = m._body if body = invalid