update doc/*/scripting/builtins/libnetwork.md

This commit is contained in:
MihailRis 2025-01-08 18:17:23 +03:00
parent 96b904e61f
commit 93b2040a0d
2 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,11 @@ end)
-- A variant for binary files, with a byte array instead of a string in the response. -- 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)) 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 ## TCP Connections

View File

@ -16,6 +16,11 @@ end)
-- Вариант для двоичных файлов, с массивом байт вместо строки в ответе. -- Вариант для двоичных файлов, с массивом байт вместо строки в ответе.
network.get_binary(url: str, callback: function(table|ByteArray)) 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-Соединения ## TCP-Соединения