Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:collect()

HTTP:collect()

Collects body data from the HTTP request or response. You may specify a specific amount using the length argument.

Syntax

HTTP:collect(t);

Arguments

Name Description

t

A table which specifies the data size to collect.

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_RESPONSE{
debug("Start\n")
t={}
t["size"]=10
HTTP:collect(t)
debug("Done\n")
}
when HTTP_DATA_RESPONSE{
table={}
table["operation"]="size"
ret=HTTP:payload(table)
debug("Size: %d \n",ret)
}

Note: The "size" refers to the httproxy block size, which is limited by the FortiADC HARD LIMIT.

Supported Version

FortiADC version 4.8.x and later.

HTTP:collect()

HTTP:collect()

Collects body data from the HTTP request or response. You may specify a specific amount using the length argument.

Syntax

HTTP:collect(t);

Arguments

Name Description

t

A table which specifies the data size to collect.

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

Example

when HTTP_RESPONSE{
debug("Start\n")
t={}
t["size"]=10
HTTP:collect(t)
debug("Done\n")
}
when HTTP_DATA_RESPONSE{
table={}
table["operation"]="size"
ret=HTTP:payload(table)
debug("Size: %d \n",ret)
}

Note: The "size" refers to the httproxy block size, which is limited by the FortiADC HARD LIMIT.

Supported Version

FortiADC version 4.8.x and later.