minetest.request http api()

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.request_http_api()

Description

  • returns HTTPApiTable containing http functions if the calling mod has been granted access by being listed in the secure.http_mods or secure.trusted_mods setting, otherwise returns nil.
  • Only works at init time and must be called from the mod's main scope (not from a function).
  • Function only exists if minetest server was built with cURL support.
  • Do not allow any other mods to access the returned table, store it in a local variable!

Example

local http = minetest.request_http_api()
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox