Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:payload(remove)

HTTP:payload(remove)

Removes a particular string or a regular expression from the buffered data.

Syntax

HTTP:payload(t);

Arguments

Name Description

t

A table which specifies the parameters: data to remove, offset, size, scope.

Events

Applicable in the following events:

  • HTTP_DATA_REQUEST

  • HTTP_DATA_RESPONSE

Example

when HTTP_DATA_REQUEST {
t={};
t[“operation”]=”remove”
t[“data”]=”sth”; -- can be a regular expression, like (s.h)
t[“offset”]=12;
t[“size”]=20;
t[“scope”]=”first” --"first" or “all”
ct = HTTP:payload(t);  --return value is a boolean false if operation fail or the number of occurrences removed
}

Supported Version

FortiADC version 4.8.x and later.

HTTP:payload(remove)

HTTP:payload(remove)

Removes a particular string or a regular expression from the buffered data.

Syntax

HTTP:payload(t);

Arguments

Name Description

t

A table which specifies the parameters: data to remove, offset, size, scope.

Events

Applicable in the following events:

  • HTTP_DATA_REQUEST

  • HTTP_DATA_RESPONSE

Example

when HTTP_DATA_REQUEST {
t={};
t[“operation”]=”remove”
t[“data”]=”sth”; -- can be a regular expression, like (s.h)
t[“offset”]=12;
t[“size”]=20;
t[“scope”]=”first” --"first" or “all”
ct = HTTP:payload(t);  --return value is a boolean false if operation fail or the number of occurrences removed
}

Supported Version

FortiADC version 4.8.x and later.