mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update doc/*/scripting/builtins/libnetwork.md
This commit is contained in:
parent
96b904e61f
commit
93b2040a0d
2 changed files with 10 additions and 0 deletions
|
|
@ -16,6 +16,11 @@ end)
|
|||
|
||||
-- A variant for binary files, with a byte array instead of a string in the response.
|
||||
network.get_binary(url: str, callback: function(table|ByteArray))
|
||||
|
||||
-- Performs a POST request to the specified URL.
|
||||
-- Currently, only `Content-Type: application/json` is supported
|
||||
-- After receiving the response, passes the text to the callback function.
|
||||
network.post(url: str, data: table, callback: function(str))
|
||||
```
|
||||
|
||||
## TCP Connections
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ end)
|
|||
|
||||
-- Вариант для двоичных файлов, с массивом байт вместо строки в ответе.
|
||||
network.get_binary(url: str, callback: function(table|ByteArray))
|
||||
|
||||
-- Выполняет POST запрос к указанному URL.
|
||||
-- На данный момент реализована поддержка только `Content-Type: application/json`
|
||||
-- После получения ответа, передаёт текст в функцию callback.
|
||||
network.post(url: str, data: table, callback: function(str))
|
||||
```
|
||||
|
||||
## TCP-Соединения
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue