PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

HttpService

Show deprecated

HttpService

Show deprecated

This service allows HTTP requests to be sent from game servers. This enables users to create integration with a wide range of third party services such as analytics and storage. One exciting prospect for this service is that if you run and manage your own website, and communicate with it from Roblox, it opens the possibility of remote server management and real time communication with the server, through your site.

If the limit of 500 http HttpService/GetAsync|GET / HttpService/PostAsync|POST requests per minute is exceeded, the Service will stall entirely for approximately 30 seconds.

Enabling HTTP requests

HttpService starts off as disabled by default.

To HttpService/HttpEnabled|enable HTTP requests, the HttpService must be enabled through Studio’s Game Settings by opening the game’s settings via the Game Settings button on the Home tab of the game’s studio window. Within the Game Settings window, navigate to the Options tab and select the On option under Allow HTTP Requests.

Usage ideas

  • Cross server marketplace
  • Real time stock market
  • Cross server leaderboard

Restrictions

  • Limit of 500 requests a minute (Per server)
  • This service is not allowed to send requests to any of the Roblox websites such as www.roblox.com or api.roblox.com

See also

See here for a detailed guide on sending HTTP requests.Sending HTTP requests.

Properties

bool

HttpEnabled

Indicates whether http request can be sent to external websites

Functions

string

GenerateGUID ( bool wrapInCurlyBraces )

Generates a UUID/GUID random string, optionally with curly braces

string

GetAsync ( string url , bool nocache , Variant headers )

[Yields]

Send an HTTP GET request

Variant

JSONDecode ( string input )

Decodes a JSON string into a Lua table

string

JSONEncode ( Variant input )

Generate a JSON string from a Lua table

string

PostAsync ( string url , string data , HttpContentType content_type , bool compress , Variant headers )

[Yields]

Performs a HTTP POST request to the supplied URL

Dictionary

RequestAsync ( Dictionary requestOptions )

[Yields]

Sends an HTTP request using any HTTP method given a dictionary of information

string

UrlEncode ( string input )

Replaces URL-unsafe characters with ‘%’ and two hexadecimal characters

Events