summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-03-23 15:17:32 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-06-23 13:53:43 +0200
commit421e771012384a41c34ed32b5d241100fbd7cea2 (patch)
tree01d6ef08ceff810fd0991f611348788c3cf0b8eb /scene
parent659178e85fed5a7ee80d76329a977ac3943c7d77 (diff)
[Net] Unify HTTPClient request and request_raw.
Diffstat (limited to 'scene')
-rw-r--r--scene/main/http_request.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index f3c7d128ba..43d7b7355c 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -322,7 +322,8 @@ bool HTTPRequest::_update_connection() {
} else {
// Did not request yet, do request
- Error err = client->request_raw(method, request_string, headers, request_data);
+ int size = request_data.size();
+ Error err = client->request(method, request_string, headers, size > 0 ? request_data.ptr() : nullptr, size);
if (err != OK) {
call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PackedStringArray(), PackedByteArray());
return true;