HttpService
HttpService : Instance
Overview
The HttpService class is a server-side service that allows games to send and receive HTTP requests to and from external web services. It enables developers to integrate their games with external APIs, databases, analytics platforms, or other online services. With HttpService, developers can fetch data, send information, or perform advanced operations that rely on external resources, expanding the capabilities of OVERDARE UGC beyond the platform.
Description
The HttpService class provides functionality for making HTTP requests and handling JSON data. It is commonly used for integrating third-party services, creating custom databases, or enabling real-time communication between a game and external systems. Before using it, developers must enable HTTP requests in the game's settings.
Properties
HttpEnabled
bool
HttpEnabled is a boolean property that indicates whether HTTP requests can be sent to external endpoint(API Server, Website).
Code Samples
Methods
GenerateGUID
The GenerateGUID method generates a globally unique identifier (GUID).
Parameters
bool
bInWrapInCurlyBraces
Return
string
Code Samples
JSONDecode
Decode JSON from the string and convert it to Lua Table
Parameters
string
InInput
Return
Value
Code Samples
JSONEncode
Generate JSON String from Lua Table
Parameters
Value
InInput
Return
string
Code Samples
UrlEncode
The UrlEncode
function takes a string reference as input and returns the URL-encoded version of that string.
Parameters
string
InInput
Return
string
Code Samples
GetAsync
Request HTTP GET message
Parameters
string
InUrl
bool
InNoCache
Value
InHeaders
Return
string
Code Samples
PostAsync
Send HTTP Post message
Parameters
string
InUrl
string
InData
Enum.HttpContentType
InContentType
bool
InCompress
Value
InHeaders
Return
string
Code Samples
RequestAsync
Sends an HTTP request using any method with the provided dictionary of information.
Parameters
Value
InRequestOptions
Return
Value