Skip to content

LoadRemoteGhostFile

The LoadRemoteGhostFile function is designed to load a single .ghost file located on a remote server. This function is useful for dynamically loading scripts or configurations from a remote source.

Parameters

  • url: The URL of the remote server where the .ghost file is located.
  • data: A table containing the data to be sent in the request.
  • headers: A table containing the HTTP headers to be included in the request.

Example Usage in Lua

Here is an example of how to use the LoadRemoteGhostFile function in Lua:

local api = ...

local http_headers = {
    ["API-KEY"] = "foo",
    ["X-Some-Header"] = "bar",
}

local data_send = {
    username = "John Doe",
    password = "password",
    authkey = "12345",
    auth_key = "12345",
    key = "exampleKey123",
    spec = "protection", 
    class = "warrior"    
}

-- Single File Loading Function
print('Loading Single File.')
local url = "https://your_remote_server.com/single-file-call"
api.LoadRemoteGhostFile(url, data_send, http_headers)