Skip to content
Roblox API Reference

HttpService

Allows sending HTTP requests and provides various web-related and JSON methods.
  • Not creatable
  • Service
Memory category
Instances
Own members
18
Inherited members
75
Subclasses
0
Siblings
608

Properties24

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byHttpService1

Property categoryData

  • HttpService.HttpEnabled: boolean = false
    Indicates whether HTTP requests can be sent to external websites.
    • Write: Local user security
    • Read capabilities: Network

Methods59

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byHttpService17
  • HttpService:CreateWebStreamClient(streamClientType: Enum.WebStreamClientType,requestOptions: { [string]: any },): WebStreamClient
    Creates a client that opens a persistent connection to stream data.
    • Capabilities: Network
    Parameters
    ParameterDescription
    streamClientType: Enum.WebStreamClientType
    The type of streaming connection to intiialize the client with.
    requestOptions: { [string]: any }
    A dictionary containing information to be requested from the server. It is identical to requestOptions in HttpService:RequestAsync().
    Returns
    TypeDescription
    WebStreamClient
    A stateful client that emits events in the stream lifecycle.
  • HttpService:CreateWebStreamClientInternal(streamClientType: Enum.WebStreamClientType,requestOptions: { [string]: any },): WebStreamClient
    • Roblox script security
    Parameters
    Parameter
    streamClientType: Enum.WebStreamClientType
    requestOptions: { [string]: any }
    Returns
    Type
    WebStreamClient
  • HttpService:GenerateGUID(wrapInCurlyBraces: boolean? = true): string
    Generates a UUID/GUID random string, optionally with curly braces.
    • Thread safe
    Parameters
    ParameterDescription
    wrapInCurlyBraces: boolean? = true
    Whether the returned string should be wrapped in curly braces ({}).
    Returns
    TypeDescription
    string
    The randomly generated UUID.
  • HttpService:GetAsync(url: any, nocache: boolean? = false, headers: any): string
    Sends an HTTP GET request.
    • Yields
    • Capabilities: Network
    Parameters
    ParameterDescription
    url: any
    The web address you are requesting data from.
    nocache: boolean? = false
    Whether the request stores (caches) the response.
    headers: any
    Used to specify some HTTP request headers.
    Returns
    TypeDescription
    string
    The GET request's response body.
  • HttpService:GetHttpEnabled(): boolean
    • Roblox script security
    Returns
    Type
    boolean
  • HttpService:GetSecret(key: string): Secret
    Returns a Secret from the secrets store.
    • Thread safe
    • Capabilities: Network
    Parameters
    ParameterDescription
    key: string
    The name of the secret to fetch, matching the identifier under which it was added to the experience's secrets store.
    Returns
    TypeDescription
    Secret
    A Secret wrapping the stored value associated with key.
  • HttpService:GetUserAgent(): string
    • Roblox script security
    Returns
    Type
    string
  • HttpService:JSONDecode(input: string): any
    Decodes a JSON string into a Luau table.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    input: string
    The JSON object being decoded.
    Returns
    TypeDescription
    any
    The decoded JSON object as a Luau table.
  • HttpService:JSONDecodeAsync(input: string): any
    • Yields
    • Roblox script security
    Parameters
    Parameter
    input: string
    Returns
    Type
    any
  • HttpService:JSONEncode(input: any): string
    Generate a JSON string from a Luau table.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    input: any
    The input Luau table.
    Returns
    TypeDescription
    string
    The returned JSON string.
  • HttpService:JSONEncodeAsync(obj: any): string
    • Yields
    • Roblox script security
    Parameters
    Parameter
    obj: any
    Returns
    Type
    string
  • HttpService:PostAsync(url: any,data: string,content_type: Enum.HttpContentType? = Enum.HttpContentType.ApplicationJson,compress: boolean? = false,headers: any,): string
    Sends an HTTP POST request.
    • Yields
    • Capabilities: Network
    Parameters
    ParameterDescription
    url: any
    The destination address for the data.
    data: string
    The data being sent.
    content_type: Enum.HttpContentType? = Enum.HttpContentType.ApplicationJson
    Modifies the value in the Content-Type header sent with the request.
    compress: boolean? = false
    Determines whether the data is compressed (gzipped) when sent.
    headers: any
    Used to specify some HTTP request headers.
    Returns
    TypeDescription
    string
    The HTTP response sent back indicating the request result.
  • HttpService:RequestAccessTokenScopesAsync(requiredScopes: { any }): Secret
    • Yields
    • Local user security
    Parameters
    Parameter
    requiredScopes: { any }
    Returns
    Type
    Secret
  • HttpService:RequestAsync(requestOptions: { [string]: any }): { [string]: any }
    Sends an HTTP request using any HTTP method given a dictionary of information.
    • Yields
    • Capabilities: Network
    Parameters
    ParameterDescription
    requestOptions: { [string]: any }
    A dictionary containing information to be requested from the server specified.
    Returns
    TypeDescription
    { [string]: any }
    A dictionary containing response information from the server specified.
  • HttpService:RequestInternal(options: { [string]: any }): Instance
    • Roblox script security
    Parameters
    Parameter
    options: { [string]: any }
    Returns
    Type
    Instance
  • HttpService:SetHttpEnabled(enabled: boolean)
    • Roblox script security
    Parameters
    Parameter
    enabled: boolean
  • HttpService:UrlEncode(input: string): string
    Replaces URL-unsafe characters with '%' and two hexadecimal characters.
    • Thread safe
    • Capabilities: Network
    Parameters
    ParameterDescription
    input: string
    The string (URL) to encode.
    Returns
    TypeDescription
    string
    The encoded string.

Events10

Inherited fromObject1
Inherited fromInstance9