request
-
- UpdatedFeb 1, 2024
- 2 minutes to read
- Washington DC
- Edge Encryption
The request object is a global object available in Edge Encryption rule action and condition scripts.
The request object is a JavaScript object that represents the client request coming in to the Edge Encryption proxy server. You must build your encryption rule to parse the request object, map request object values to fields in a table on the instance, and encrypt any sensitive data in the request object.
The request object includes the following attributes and data from the client request:
request - getAsJsonContent()
Returns the request as an iterable object of type JsonNode.
This method is available only in an Edge Encryption rule if the request body is a valid JSON payload. If you are not sure what format the request body includes, check the contentType field on the request object.
Once the request is returned as a JsonNode object, you can use the JSON APIs to iterate over the object and encrypt fields.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
JsonNode | The request as an iterable JsonNode. |
request - getAsXmlContent()
Returns the request content as an iterable object of type XMLContent.
This method is available only in an Edge Encryption rule if the request body is a valid XML payload. If you are not sure what format the request body includes, check the contentType field on the request object.
Once the request is returned as an XMLContent object, you can use the XML APIs to iterate over the object and encrypt fields.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
XMLContent | The request as an iterable object of type XMLContent. |
request - XMLContains(String path)
Returns true if the given path exists in the XML DOM.
This method is available only if the request body is a valid XML payload. If you are not sure what format the request body includes, check the contentType field on the request object.
Name | Type | Description |
---|---|---|
path | String | XPath statement you are searching for. |
Type | Description |
---|---|
Boolean | Whether the given path exists in the XML DOM. |