Set default http request method
This commit is contained in:
1 parent
e941bc2439
commit
3c43934081
1 file changed
+1
-3
@@ -61,6 +61,7 @@ namespace HttpClient
|
|||||||
function new()
|
function new()
|
||||||
m._timeoutSeconds = 30
|
m._timeoutSeconds = 30
|
||||||
m._tryCount = 1
|
m._tryCount = 1
|
||||||
|
m._method = "GET"
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Method(method as string) as HttpRequest
|
function Method(method as string) as HttpRequest
|
||||||
@@ -249,9 +250,6 @@ namespace HttpClient
|
|||||||
else if m._method = "HEAD"
|
else if m._method = "HEAD"
|
||||||
m._sent = m.urlTransfer.AsyncHead()
|
m._sent = m.urlTransfer.AsyncHead()
|
||||||
else
|
else
|
||||||
if StringUtils.IsNullOrEmpty(m._method)
|
|
||||||
throw "Http request method not set"
|
|
||||||
end if
|
|
||||||
m.urlTransfer.SetRequest(m._method)
|
m.urlTransfer.SetRequest(m._method)
|
||||||
body = m._body
|
body = m._body
|
||||||
if body = invalid
|
if body = invalid
|
||||||
|
|||||||
Reference in new issue
Block a user