Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:payload(content)

HTTP:payload(content)

Returns the buffered content in a string.

Syntax

HTTP:payload(str);

Arguments

Name Description

str

A string which will be calculated.

Events

Applicable in the following events:

  • HTTP_DATA_REQUEST

  • HTTP_DATA_RESPONSE

Example

when HTTP_DATA_REQUEST {
t={};
t[“operation”]=”content”;   --return the buffered content
t[“offset”]=12;
t[“size”]=20;
ct = HTTP:payload(t);   --return value is a string containing the buffered content
}

Note: The “offset” and “size” fields are optional. If the “offset” field is missing, zero is assumed. If the “size” field is missing, it will operate on the whole buffered data.

Supported Version

FortiADC version 4.8.x and later.

HTTP:payload(content)

HTTP:payload(content)

Returns the buffered content in a string.

Syntax

HTTP:payload(str);

Arguments

Name Description

str

A string which will be calculated.

Events

Applicable in the following events:

  • HTTP_DATA_REQUEST

  • HTTP_DATA_RESPONSE

Example

when HTTP_DATA_REQUEST {
t={};
t[“operation”]=”content”;   --return the buffered content
t[“offset”]=12;
t[“size”]=20;
ct = HTTP:payload(t);   --return value is a string containing the buffered content
}

Note: The “offset” and “size” fields are optional. If the “offset” field is missing, zero is assumed. If the “size” field is missing, it will operate on the whole buffered data.

Supported Version

FortiADC version 4.8.x and later.