mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current 3.2 branch
This commit is contained in:
@@ -39,7 +39,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content
|
||||
# Note: Don't make simultaneous requests using a single HTTPRequest node.
|
||||
# The snippet below is provided for reference only.
|
||||
var body = {"name": "Godette"}
|
||||
var error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
|
||||
error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
|
||||
@@ -84,6 +84,8 @@ Can be used to make HTTP requests, i.e. download or upload files or web content
|
||||
|
||||
**Note:** When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to `CORS <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`_. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the ``Access-Control-Allow-Origin: *`` HTTP header.
|
||||
|
||||
**Note:** SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error.
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
@@ -97,7 +99,7 @@ Properties
|
||||
+-----------------------------+----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`int<class_int>` | :ref:`body_size_limit<class_HTTPRequest_property_body_size_limit>` | ``-1`` |
|
||||
+-----------------------------+----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`int<class_int>` | :ref:`download_chunk_size<class_HTTPRequest_property_download_chunk_size>` | ``4096`` |
|
||||
| :ref:`int<class_int>` | :ref:`download_chunk_size<class_HTTPRequest_property_download_chunk_size>` | ``65536`` |
|
||||
+-----------------------------+----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`String<class_String>` | :ref:`download_file<class_HTTPRequest_property_download_file>` | ``""`` |
|
||||
+-----------------------------+----------------------------------------------------------------------------+-----------+
|
||||
@@ -215,7 +217,7 @@ Maximum allowed size for response bodies.
|
||||
- :ref:`int<class_int>` **download_chunk_size**
|
||||
|
||||
+-----------+--------------------------------+
|
||||
| *Default* | ``4096`` |
|
||||
| *Default* | ``65536`` |
|
||||
+-----------+--------------------------------+
|
||||
| *Setter* | set_download_chunk_size(value) |
|
||||
+-----------+--------------------------------+
|
||||
@@ -224,7 +226,7 @@ Maximum allowed size for response bodies.
|
||||
|
||||
The size of the buffer used and maximum bytes to read per iteration. See :ref:`HTTPClient.read_chunk_size<class_HTTPClient_property_read_chunk_size>`.
|
||||
|
||||
Set this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory.
|
||||
Set this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to decrease memory usage at the cost of download speeds.
|
||||
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user