Web Request

The Web Request node allows ERGS Studio to perform standard HTTP and HTTPS network requests (Studio -> Web). It serves as a fundamental communication bridge to connect your game logic with external systems, remote servers, REST APIs, or third-party web services.
Connectors and Logic:
- event [action]: The execution trigger that initiates the network request.
- url [string]: The target server address. You can define this statically in the node properties or change it dynamically during gameplay by connecting a string value to this pin.
- POST [string]:
- If this pin is connected and contains a string, the node automatically sends a POST request using the input string as the request body.
- If this input is left empty or disconnected, the node performs a standard GET request.
Outputs and Feedback:
- onFinish [action]: An action signal fired as soon as the server responds or if the connection attempt is finalized.
- response [string]: The raw text response (body) returned by the server.
- httpCode [integer]: The numeric HTTP status code returned by the server (e.g., 200 for success, 404 for not found, or 500 for server error). This is critical for logic branching, such as triggering different events based on a successful vs. failed request.
- contentType [string]: Provides information about the data format returned by the server (e.g.,
application/json,text/plain, ortext/html).
Node Properties:
- content-type: Allows you to specify the
Content-Typeheader for outgoing requests (e.g., setting it toapplication/jsonwhen sending JSON data via POST). - url: The default URL used if the input pin is not dynamically driven.
Common Use Cases:
- External API Integration: Fetching live data (weather, currency, or news) to display on in-game screens.
- IoT Control: Sending HTTP webhooks to smart devices (like Philips Hue or smart plugs) that aren't managed via MQTT.
- Leaderboards & Logging: Posting player scores or room completion times to an external database or a Room Master dashboard.
- Remote Triggers: Activating external software or physical hardware that provides a REST interface.
Note
Use this node in conjunction with the JSON Formatter (found in the Project tab). The formatter allows you to configure input pins and data formats to automatically generate a JSON-formatted packet or a URL Query string for GET requests.
Connectors in
- event [type: action]
- url [type: string]
- POST [type: string]
Connectors out
- onFinish [type: action]
- response [type: string]
- httpCode [type: integer]
- contentType [type: string]
Node properties
- content-type [type: string]
- url [type: string]