diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 3d18a741481..753ef6ce8a1 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -611,7 +611,7 @@ Error HTTPClient::poll() { return OK; } -int HTTPClient::get_response_body_length() const { +int64_t HTTPClient::get_response_body_length() const { return body_size; } diff --git a/core/io/http_client.h b/core/io/http_client.h index b9fed898e98..6a535c0ddbd 100644 --- a/core/io/http_client.h +++ b/core/io/http_client.h @@ -220,7 +220,7 @@ public: bool is_response_chunked() const; int get_response_code() const; Error get_response_headers(List *r_response); - int get_response_body_length() const; + int64_t get_response_body_length() const; PoolByteArray read_response_body_chunk(); // Can't get body as partial text because of most encodings UTF8, gzip, etc. diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp index 7e0a2591c51..1cc8f5220d7 100644 --- a/platform/javascript/http_client_javascript.cpp +++ b/platform/javascript/http_client_javascript.cpp @@ -185,7 +185,7 @@ Error HTTPClient::get_response_headers(List *r_response) { return OK; } -int HTTPClient::get_response_body_length() const { +int64_t HTTPClient::get_response_body_length() const { return godot_js_fetch_body_length_get(js_id); }