mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (46a568e0a)
This commit is contained in:
@@ -17,7 +17,9 @@ Low-level hyper-text transfer protocol client.
|
||||
Description
|
||||
-----------
|
||||
|
||||
Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. **See the :ref:`HTTPRequest<class_HTTPRequest>` node for a higher-level alternative.**\
|
||||
Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases.
|
||||
|
||||
See the :ref:`HTTPRequest<class_HTTPRequest>` node for a higher-level alternative.
|
||||
|
||||
\ **Note:** This client only needs to connect to a host once (see :ref:`connect_to_host<class_HTTPClient_method_connect_to_host>`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request<class_HTTPClient_method_request>` for a full example and to get started.
|
||||
|
||||
@@ -29,7 +31,7 @@ For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/H
|
||||
|
||||
\ **Note:** It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
|
||||
|
||||
\ **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:** When performing HTTP requests from a project exported to Web, 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.
|
||||
|
||||
@@ -501,7 +503,7 @@ The host should not have http:// prepended but will strip the protocol identifie
|
||||
|
||||
If no ``port`` is specified (or ``-1`` is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if ``use_ssl`` is enabled).
|
||||
|
||||
\ ``verify_host`` will check the SSL identity of the host if set to ``true``.
|
||||
``verify_host`` will check the SSL identity of the host if set to ``true``.
|
||||
|
||||
----
|
||||
|
||||
@@ -663,7 +665,7 @@ To create a POST request with query strings to push to the server, do:
|
||||
|
||||
|
||||
|
||||
\ **Note:** The ``request_data`` parameter is ignored if ``method`` is :ref:`METHOD_GET<class_HTTPClient_constant_METHOD_GET>`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode<class_String_method_uri_encode>` for an example.
|
||||
\ **Note:** The ``body`` parameter is ignored if ``method`` is :ref:`METHOD_GET<class_HTTPClient_constant_METHOD_GET>`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode<class_String_method_uri_encode>` for an example.
|
||||
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user