Roblox Wiki
Roblox Wiki
36,843
pages

The HttpService class, added in version 0.122, inherits from Instance. It cannot be instantiated. HTTP requests were enabled on December 12, 2013.[1]

Properties

HttpEnabled: bool

Determines whether or not in-experience HTTP requests are enabled.

  • Category: Data.
  • Write security: LocalUserSecurity.
  • Serialization: can save and load.
  • Thread safety: read safe

Methods

CreateWebStreamClient(streamClientType: WebStreamClientType, requestOptions: Dictionary): WebStreamClient

This class member is missing documentation. Create or add to its subpage at Class:HttpService/CreateWebStreamClient.
  • Thread safety: unsafe

CreateWebStreamClientInternal(streamClientType: WebStreamClientType, requestOptions: Dictionary): WebStreamClient

This class member is missing documentation. Create or add to its subpage at Class:HttpService/CreateWebStreamClientInternal.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

GenerateGUID(wrapInCurlyBraces: bool = true): string

Parameters
NameTypeDefaultDescription
wrapInCurlyBracesbooltrueWhether or not to wrap the newly-generated GUID in curly braces.

Generates a GUID.

  • Thread safety: safe

GetAsync(url: Variant, nocache: bool = false, headers: Variant): string

  • YieldsThis function can yield the script it is used in.
Parameters
NameTypeDefault
urlVariant
nocacheboolfalse
headersVariant
  • Thread safety: unsafe

GetHttpEnabled(): bool

This class member is missing documentation. Create or add to its subpage at Class:HttpService/GetHttpEnabled.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

GetSecret(key: string): Secret

Parameters
NameType
keystring
  • Thread safety: safe

GetUserAgent(): string

This class member is missing documentation. Create or add to its subpage at Class:HttpService/GetUserAgent.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

JSONDecode(input: string): Variant

  • Custom Lua stateThis member uses the Lua C API directly.
Parameters
NameType
inputstring
  • Thread safety: safe

JSONDecodeAsync(input: string): Variant

  • YieldsThis function can yield the script it is used in.
This class member is missing documentation. Create or add to its subpage at Class:HttpService/JSONDecodeAsync.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

JSONEncode(input: Variant): string

  • Custom Lua stateThis member uses the Lua C API directly.
This method converts the provided table into a JSON table via a string.
Parameters
NameType
inputVariant
  • Thread safety: safe

JSONEncodeAsync(obj: Variant): string

  • YieldsThis function can yield the script it is used in.
This class member is missing documentation. Create or add to its subpage at Class:HttpService/JSONEncodeAsync.
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

PostAsync(url: Variant, data: string, content_type: HttpContentType = ApplicationJson, compress: bool = false, headers: Variant): string

  • YieldsThis function can yield the script it is used in.
Parameters
NameTypeDefault
urlVariant
datastring
content_typeHttpContentTypeApplicationJson
compressboolfalse
headersVariant
  • Thread safety: unsafe

RequestAsync(requestOptions: Dictionary): Dictionary

  • YieldsThis function can yield the script it is used in.
Parameters
NameType
requestOptionsDictionary
  • Thread safety: unsafe

RequestInternal(options: Dictionary): Instance

Parameters
NameType
optionsDictionary
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

SetHttpEnabled(enabled: bool): null

Parameters
NameType
enabledbool
  • Security: RobloxScriptSecurity.
  • Thread safety: unsafe

UrlEncode(input: string): string

Parameters
NameType
inputstring
  • Thread safety: safe

External links[]

References[]