Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:payload(size)

HTTP:payload(size)

Returns the size of the buffered content. The returned value is an integer.

Syntax

HTTP:payload(t);

Arguments

Name Description

t

A table which specifies the operation-size of the request/response data.

Events

Applicable in the following events:

  • HTTP_DATA_REQUEST

  • HTTP_DATA_RESPONSE

Example

when HTTP_DATA_RESPONSE{
t1={}
t1["operation"]="size"
sz=HTTP:payload(t1)
debug("----response data size: %d-----\n", sz)}

Supported Version

FortiADC version 4.8.x and later.

HTTP:payload(size)

HTTP:payload(size)

Returns the size of the buffered content. The returned value is an integer.

Syntax

HTTP:payload(t);

Arguments

Name Description

t

A table which specifies the operation-size of the request/response data.

Events

Applicable in the following events:

  • HTTP_DATA_REQUEST

  • HTTP_DATA_RESPONSE

Example

when HTTP_DATA_RESPONSE{
t1={}
t1["operation"]="size"
sz=HTTP:payload(t1)
debug("----response data size: %d-----\n", sz)}

Supported Version

FortiADC version 4.8.x and later.