Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

进行 HTTP 请求

为什么使用 HTTP?

HTTP 请求可以用来与 Web 服务器以及其他非 Godot 程序通信。

与 Godot 的其他网络功能(例如高阶多人游戏)相比,HTTP 请求的额外开销更大,起步也更慢,所以并不适合实时通信,也不善于进行多人游戏中常见的大量较小更新的发送。

HTTP, however, offers interoperability with external web resources and is great at sending and receiving large amounts of data, for example to transfer files like game assets. These assets can then be loaded using runtime file loading and saving.

所以 HTTP 可以用在游戏的登录系统、大厅浏览器,可以从 Web 获取信息,也可以下载游戏资产。

本教学假设你对Godot和Godot编辑器有一定的了解。请参阅