Functions 2
http.get(url: string, options: {query: {[string]: string}?, headers: {[string]: string}?, timeout: number?, cache: number?}?) → HttpResponseGET 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) -> ()}) → SocketOpens 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.