Set default http request method

This commit is contained in:
Brahim Hadriche committed 2023-11-10 15:32:43 -05:00
1 parent e941bc2439
commit 3c43934081
1 file changed
+1 -3
@@ -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