summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLejo <Lejo_1@web.de>2020-07-30 00:16:21 +0300
committerGitHub <noreply@github.com>2020-07-29 23:16:21 +0200
commit715a123a33db7b0f191259ba68cbc9c565d0d4e8 (patch)
tree5925cc93ad339477d58dcea42bcf79b62e2ded5d /doc
parentf34abaedd2b9277c1862cd9b82ca3338747f104e (diff)
downloadminetest-715a123a33db7b0f191259ba68cbc9c565d0d4e8.tar.gz
minetest-715a123a33db7b0f191259ba68cbc9c565d0d4e8.tar.bz2
minetest-715a123a33db7b0f191259ba68cbc9c565d0d4e8.zip
Add PUT and DELETE request + specific method value to HTTP API (#9909)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 5fe02b452..2d22dc899 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -8071,11 +8071,13 @@ Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
timeout = 10,
-- Timeout for connection in seconds. Default is 3 seconds.
- post_data = "Raw POST request data string" OR {field1 = "data1", field2 = "data2"},
- -- Optional, if specified a POST request with post_data is performed.
+ method = "GET", "POST", "PUT" or "DELETE"
+ -- The http method to use. Defaults to "GET".
+
+ data = "Raw request data string" OR {field1 = "data1", field2 = "data2"},
+ -- Data for the POST, PUT or DELETE request.
-- Accepts both a string and a table. If a table is specified, encodes
-- table as x-www-form-urlencoded key-value pairs.
- -- If post_data is not specified, a GET request is performed instead.
user_agent = "ExampleUserAgent",
-- Optional, if specified replaces the default minetest user agent with
@@ -8089,6 +8091,10 @@ Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
multipart = boolean
-- Optional, if true performs a multipart HTTP request.
-- Default is false.
+ -- Post only, data must be array
+
+ post_data = "Raw POST request data string" OR {field1 = "data1", field2 = "data2"},
+ -- Deprecated, use `data` instead. Forces `method = "POST"`.
}
`HTTPRequestResult` definition