Web Request

The brand new scripting documentation is located here: https://api.tabletopsimulator.com/

The static global WebRequest class allows you to interact with the web with get, post, and put. For example, WebRequest.get(“https://www.google.com/”, self, “webRequestCallback”).

Member Variables

TypeVariable NameDescription
booldownload_progressIf this is downloading what percent is it at (0-1 value).
stringerrorError text from the WebRequest.
boolis_errorIs their an error with this WebRequest?
boolis_doneIs the WebRequest finished?
stringtextThe returned data in text from the WebRequest.
boolupload_progressIf this is uploading what percent is it at (0-1 value).
stringurlThe url for this WebRequest.

Functions

Return ValueFunction NameDescription
WebRequestget(string url, Object callback_owner, string callback)Get data in text from the url. Callback function is supplied the WebRequest.
WebRequestpost(string url, Table form, Object callback_owner, string callback)Post the form to the url. Callback function is supplied the WebRequest.
WebRequestput(string url, string data, Object callback_owner, string callback)Put the data to the url. Callback function is supplied the WebRequest.