Node Reference
Base
Rest Server Reference
The Rest Server Reference Node injects a reference to the Rest Server Component into the current execution thread.
This allows the Endpoint Definition Nodes to access it easily.
- Rest Server: Needs the reference to a Rest Server instance.
Endpoint Definition
The Endpoint Definition Node describes an endpoint that a client can call.
It needs to be paired with an Incoming Request Event to receive the call to be useful.
- Method: Describes which Http Method this definition responds to.
- Type: Allows the definition of PLAIN string paths, or REGEX matches. See Path.
- Path: The http path this definition is listening to.
- Type: PLAIN: Specifies the endpoint as plain string. Has to start with a “/”.
- Type: REGEX: Specifies the endpoint as regular expression. Should match a starting “/”.
- Timeout (ms): Every incoming request is terminated after this timeout. Set -1 to wait indefinitely (not recommended).
- Endpoint Reference: This output needs to be connected to an Incoming Rest Request node to execute code when a rest request is received.
Incoming Rest Request
Incoming Rest Request is an event that is fired when the connected Endpoint Definition matches the incoming request.
The Output Trigger is called in that case.
Send Response
The Send Reponse Node terminates the request and sends a response back to the caller.
Every request needs to be terminated/finished with a Send Response Node.
- Body: The content string to send back.
- Headers: Header collection to send to the caller.
- Status Code: HTTP Status Code to send back.
Auto Endpoint
Provides an endpoint implementation to update scaling/rotation and position of the given Game Object.
Has to be directly connected to the Rest Server Reference Node, can’t be connected to an Incoming Rest Request Node.
- Game Object: The object that is modified
- Endpoint Path: The endpoint path that accepts requests to retrieve or update scaling/rotation and/or position
The following HTTP methods are understood by the implementation:
- GET: Retrieves the current information from the Game Object.
- POST: Overwrite the current information on the Game Object with the ones supplied from the request. Every field from the json not supplied in the request, will have it’s default value (usually 0).
- PATCH: Update the current information on the Game Object with the information from the request. Fields not supplied in the json will retrain their current value.
The endpoint understands the following json format and also accepts the same json to update the referenced Game Object:
{
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"rotation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}
- position: Current position relative to the parent object.
- rotation: Rotation relative to the parent object in euler angles.
- scale: Scale relative to the parent object.
Adds a header to the collection given on Header Input. If Header Input is unconnected, a new collection
is created.
- Header Input: Input existing header collection (Optional).
- Header Name: The name of the header to add.
- Header Value: The value of the header to add.
- Header Output: The new header collection with the header added.
Adds a header to the collection given on Header Input. If Header Input is unconnected, a new collection
is created.
- Header Input: Input existing header collection (Optional).
- Header Name: The name of the header to add.
- Header Value: The value of the header to add.
- Header Output: The new header collection with the header added.
Extracts the header collection from the current incoming request.
Needs to be connected after an Incoming Request Event node.
- Headers: Output of the headers of the current request.
Removes the given header name and value (optional) combination from the header collection.
- Header Input: Existing header collection to remove the header from.
- Header Name: Name of the header to remove.
- Header Value: If provided only the name and value combination will be removed. If not provided, all values for the given header name will be removed.
- Header Output: The updated header collection.
Removes the given header name and value (optional) combination from the header collection.
- Header Input: Existing header collection to remove the header from.
- Header Name: Name of the header to remove.
- Header Value: If provided only the name and value combination will be removed. If not provided, all values for the given header name will be removed.
- Header Output: The updated header collection.
Add the header with the given value to the header collection or overwrite the existing value.
If Header Input is unconnected, a new collection is created.
- Header Input: Input existing header collection (Optional).
- Header Name: The name of the header to set.
- Header Value: The value of the header to set.
- Header Output: The new header collection with the updated values.
Add the header with the given value to the header collection or overwrite the existing value.
If Header Input is unconnected, a new collection is created.
- Header Input: Input existing header collection (Optional).
- Header Name: The name of the header to set.
- Header Value: The value of the header to set.
- Header Output: The new header collection with the updated values.
Body
Get Body
Extracts the body as text from the incoming request.
Needs to be connected after an Incoming Request Event node.
- Body: Body text from the incoming request
Query Parameters
Get Query Parameters
Extract the query parameters from the incoming request (the “?a=0&b=1” part of the url).
Needs to be connected after an Incoming Request Event node.
- Parameters: Parameters from the incoming request as
Dictionary<string,List<string>>
Get Query Parameters (simple)
Extract the query parameters from the incoming request (the “?a=0&b=1” part of the url). This node
generates a simpler output, as most query parameters are normally unique and don’t have multiple values. It only
keeps the last value for each query parameter.
Needs to be connected after an Incoming Request Event node.
- Parameters: Parameters from the incoming request as
Dictionary<string,string>