[request.ip]
request.ip is a slot in the request namespace, in Hyperlambda, the language of Magic Cloud. Returns the client IP address for the current request.
- Returns: Resolves to the client IP address for the requested IP version
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
[version] |
string | no | IP version to return, either ipv4 or ipv6. |
JSON declaration
This is the complete declaration of request.ip, as the running system describes it. It is also published as slot.json.
JSON declaration
{
"name": "request.ip",
"description": "Returns the client IP address for the current request",
"signature": {
"children": {
"version": {
"type": "string",
"kind": "ip-version",
"description": "IP version to return, either ipv4 or ipv6",
"required": false,
"mode": "ValueOrExpression",
"cardinality": "ZeroOrOne",
"role": "Option",
"projection": "Value"
}
},
"output": {
"mode": "Value",
"kind": "ip-address,text",
"description": "Resolves to the client IP address for the requested IP version"
}
}
}
← request.host |
all request.* slots |
request.scheme → |