Guide 1 Docs 2 Reference 3
2

http global

Fetches public URLs. The call waits like task.wait.

Docs: Data

Functions 2

http.get(url: string, options: {query: {[string]: string}?, headers: {[string]: string}?, timeout: number?, cache: number?}?) → HttpResponse

GET a URL. cache is the seconds a 200 answer is kept on disk; timeout is 1 to 60 seconds, 15 by default.

http.socket(url: string, options: {headers: {[string]: string}?, on_message: (message: SocketMessage) -> ()}) → Socket

Opens a WebSocket (ws or wss) and keeps it open: when the connection ends, the engine dials again. on_message gets each message on a tick.