Add HTTPApiTable class definition into mt-ide-helper. Relates to lord-server/lord#1402
This commit is contained in:
23
classes/HTTPApiTable.lua
Normal file
23
classes/HTTPApiTable.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
--- @class HTTPRequestHandle
|
||||||
|
|
||||||
|
--- @class HTTPApiTable
|
||||||
|
local HTTPApiTable = {}
|
||||||
|
|
||||||
|
--- Performs given request asynchronously and calls callback upon completion.
|
||||||
|
--- Use this HTTP function if you are unsure, the others are for advanced use.
|
||||||
|
---
|
||||||
|
--- @param request HTTPRequest
|
||||||
|
--- @param callback fun(result:HTTPRequestResult)
|
||||||
|
function HTTPApiTable:fetch(request, callback) end
|
||||||
|
|
||||||
|
--- Performs given request asynchronously and returns handle for `HTTPApiTable.fetch_async_get()`.
|
||||||
|
---
|
||||||
|
--- @param request HTTPRequest
|
||||||
|
--- @return HTTPRequestHandle
|
||||||
|
function HTTPApiTable:fetch_async(request) end
|
||||||
|
--- Return response data for given asynchronous HTTP request.
|
||||||
|
---
|
||||||
|
--- @param handle HTTPRequestHandle
|
||||||
|
--- @return HTTPRequestResult
|
||||||
|
function HTTPApiTable:fetch_async_get(handle) end
|
||||||
|
|
||||||
@@ -1963,6 +1963,8 @@ function minetest.read_schematic(schematic, options) end
|
|||||||
--- * **DO NOT ALLOW ANY OTHER MODS TO ACCESS THE RETURNED TABLE, STORE IT IN
|
--- * **DO NOT ALLOW ANY OTHER MODS TO ACCESS THE RETURNED TABLE, STORE IT IN
|
||||||
--- A LOCAL VARIABLE!**
|
--- A LOCAL VARIABLE!**
|
||||||
---
|
---
|
||||||
|
--- @return HTTPApiTable
|
||||||
|
---
|
||||||
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L5606-L5616)
|
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L5606-L5616)
|
||||||
function minetest.request_http_api() end
|
function minetest.request_http_api() end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user