HTTP
HTTP request descriptions, response records and body helpers.
Pick the return shape you need:
requestgives you status, headers, body, and a structured failure result.httpgetand the DataModel helpers return only the body. An unsuccessful operation produces an empty string.
The request wrapper accepts a specific set of outgoing headers. See HTTP and JSON for response handling.
Headers that are added for you
Every outgoing request carries a few headers you did not set. Which User-Agent goes out depends on
which call you made, because the body-returning calls are the engine's own HTTP surface and present
the engine's agent, while request presents the executor.
| Header | request | httpget, game:HttpGet, game:HttpPost |
|---|---|---|
User-Agent | Virginia/1 | Roblox/WinInet |
Acedia-Fingerprint | yes | yes |
Roblox-Session-Id | yes | yes |
Roblox-Game-Id | yes | yes |
Roblox-Place-Id | yes | yes |
Accept | */* | not set |
Acedia-Fingerprint is a hex digest that identifies the machine. It is stable across sessions and
the same for every request, so a server can recognise a returning user without being told anything
about them.
Roblox-Session-Id is a JSON object carrying GameId, PlaceId and UniverseId. Roblox-Game-Id
is the current game.JobId and Roblox-Place-Id the current game.PlaceId, so all three read as
empty or absent until the client has finished joining. These are the headers the engine attaches to
its own requests, which is why the body-returning calls send them too.
A header you set yourself wins: request applies the defaults above first and then your Headers
table over them, so passing User-Agent or Accept replaces ours rather than duplicating it.
WebSocket.connect sends the executor User-Agent on its
handshake. It does not add a fingerprint or the session headers.
Functions
| Function | Purpose |
|---|---|
| request | Performs an HTTP request and returns a structured response. |
| httpget | Fetches an HTTP response body. |
| game:HttpGet | Fetches a response body through the DataModel HTTP method. |
| game:HttpPost | Posts data through the DataModel HTTP method and returns the response body. |
