Product Documentation

Expression prefixes for text in HTTP requests and responses

An HTTP request or response typically contains text, such as in the form of headers, header values, URLs, and POST body text. You can configure expressions to operate on one or more of these text-based items in an HTTP request or response.

The following table describes the expression prefixes that you can configure to extract text from different parts of an HTTP request or response.

Prefix Description
HTTP.REQ.BODY(\<integer\>)|Example: HTTP.REQ.BODY(100). It will return first 100 characters of HTTP Request body. If the length of the body is less than 100 then the the whole body will result as output.  
HTTP.REQ.HOSTNAME Example: HTTP.REQ.HOSTNAME.EQ("abc.com”). This example returns true if the hostname is abc.com. It returns HTTP HostName object from this request. If the target hostname is present in the first line of the request then that is selected. Otherwise, the value in the last occurrence of the HOST header is selected. The format of the output is abc.foo.com:8080. For more information on typecasting, see Typecasting data.
HTTP.REQ.HOSTNAME.DOMAIN Example: HTTP.REQ.HOSTNAME.DOMAIN.EQ("foobar.com"). This example returns true if domain name is foobar.com. It returns Domain name part of the hostname. If the hostname is www.foobar.com or www.foobar.com:8080, then domain is foobar.com.
HTTP.REQ.HOSTNAME.SERVER Example: HTTP.REQ.HOSTNAME.SERVER.EQ("www.foobar.com"). This example returns true if the server name is www.foobar.com. If the hostname is www.foobar.com or www.foobar.com:8080, then the server is www.foobar.com.
HTTP.REQ.METHOD Example: HTTP.REQ.METHOD.EQ("GET”). This example returns true if the method name is GET.
HTTP.REQ.URL Example: HTTP.REQ.URL.EQ(<http://www.google.com>). This example returns true if URL is <http://www.google.com>. It returns the HTTP URL object from request.
HTTP.REQ.URL.HOSTNAME Example: HTTP.REQ.URL.HOSTNAME.EQ(“abc.foo.com:8080”). This example returns true if hostname in URL is abc.foo.com:8080. It returns HTTP Host Name present in the URL. For more information on typecasting, see Typecasting data.
HTTP.REQ.URL.HOSTNAME.DOMAIN Example: HTTP.REQ.URL.HOSTNAME.DOMAIN.EQ(“foobar.com”). This example returns true if the domain name is foobar.com. It returns Domain name part of the hostname. If the hostname is www.foobar.com or www.foobar.com:8080, then the the domain is foobar.com.
HTTP.REQ.URL.HOSTNAME.SERVER Example: HTTP.REQ.URL.HOSTNAME.SERVER.EQ("www.foobar.com"). This example returns true if the server name is www.foobar.com. If the hostname is www.foobar.com or www.foobar.com:8080, then the server is www.foobar.com.
HTTP.REQ.URL.HOSTNAME.PORT Example: HTTP.REQ.URL.HOSTNAME.PORT.EQ(80). This example returns true if the port is 80. It returns number on the port part of the hostname.
HTTP.REQ.URL.PATH Example: HTTP.REQ.URL.PATH.GET(1). If the URL is <http://www.foo.com/a/b/c/bar.html?a=1> then the operation will select /a/b/c/bar.html, then the above example will result in “a”. It returns/separated List on the path component of the URL.
HTTP.REQ.URL.PATH_AND_QUERY Example: HTTP.REQ.URL.PATH_AND_QUERY. If the URL is <http://www.foo.com/a/b/c/bar.html?a=1> then it will return /a/b/c/bar.html?a=1. It returns the portion of the URL following the hostname
HTTP.REQ.URL.PROTOCOL Example: HTTP.REQ.URL.PROTOCOL. If the URL is <http://www.foo.com/a/b/c/bar.html?a=1> then the operation will result in HTTP. It results in the protocol present in the URL.
HTTP.REQ.URL.QUERY Example: HTTP.REQ.URL.QUERY. If the URL is <http://www.foo.com?abc=1&def=2> will result in abc=1&def=2. It results as Name-Value List (with delimiters = and &) in the query component of the URL.
HTTP.REQ.URL.QUERY.VALUE Example: HTTP.REQ.URL.QUERY.VALUE(0). If the URL is <http://www.foo.com?abc=1&def=2> will result in 1. It returns the value component of the specified name-value component in the list.
HTTP.REQ.URL.SUFFIX Example: HTTP.REQ.URL.SUFFIX. If the path is /a/b/c.html then this operation will result in html. It returns filename suffice of the URL.
HTTP.REQ.USER Example: HTTP.REQ.USER.GROUPS('grp1:grp2'). This example returns list on the Group which is separated by given delimiter I.e. “:” It returns the AAA User associated with the current HTTP transaction.
HTTP.REQ.USER.EXTERNAL_GROUPS Example: HTTP.REQ.USER.EXTERNAL_GROUPS. This example lists external groups which are separated by “,”. IT returns a list of external groups which are separated by “,”.
HTTP.REQ.USER.EXTERNAL_GROUPS.IGNORE_EMPTY_ELEMENTS Example: HTTP.REQ.USER.EXTERNAL_GROUPS.IGNORE_EMPTY_ELEMENTS.COUNT. If AAA User associated with the current HTTP transaction is part of some external groups : 123,,24, ,15 then HTTP.REQ.USER.EXTERNAL_GROUPS. IGNORE_EMPTY_ELEMENTS.COUNT gives 4, whereas HTTP.REQ.USER.EXTERNAL_GROUPS.COUNT gives 5. It ignores empty elements in the list.
HTTP.REQ.USER.EXTERNAL_GROUPS(sep) Example: HTTP.REQ.USER.EXTERNAL_GROUPS(“:”). This example lists external groups which are separated by “:” It returns a list of external groups which are separated by given delimiter.
HTTP.REQ.USER.GROUPS Example: HTTP.REQ.USER.GROUPS. This example lists groups which are separated by “,”. IT returns a list of groups which are separated by “,”.
HTTP.REQ.USER.GROUPS.IGNORE_EMPTY_ELEMENTS Example: HTTP.REQ.USER.GROUPS. IGNORE_EMPTY_ELEMENTS.COUNT. If AAA User associated with the current HTTP transaction is part of some groups : 123,,24, ,15 then HTTP.REQ.USER.GROUPS. IGNORE_EMPTY_ELEMENTS.COUNT gives 4, whereas HTTP.REQ.USER.GROUPS.COUNT gives 5. It ignores empty elements in the list.
HTTP.REQ.USER.GROUPS(sep) Example: HTTP.REQ.USER.GROUPS(“:”). This example lists groups which are separated by “:” IT returns a list of groups which are separated by given delimiter.
HTTP.REQ.USER.INTERNAL_GROUPS Example: HTTP.REQ.USER.INTERNAL_GROUPS. This example lists internal groups which are separated by “,”. IT returns a list of internal groups which are separated by “,”.
HTTP.REQ.USER.INTERNAL_GROUPS.IGNORE_EMPTY_ELEMENTS Example: HTTP.REQ.USER.INTERNAL_GROUPS. IGNORE_EMPTY_ELEMENTS.COUNT. If AAA User associated with the current HTTP transaction is part of some internal groups : 123,,24, ,15 then HTTP.REQ.USER.INTERNAL_GROUPS.IGNORE_EMPTY_ELEMENTS.COUNT gives 4, whereas HTTP.REQ.USER.INTERNAL_GROUPS.COUNT gives 5. It ignores empty elements in the list.
HTTP.REQ.USER.INTERNAL_GROUPS(sep) Example: HTTP.REQ.USER.INTERNAL_GROUPS(“:”). This example lists internal groups which are separated by “:” IT returns a list of internal groups which are separated by given delimiter.
HTTP.REQ.USER.IS_MEMBER_OF(group_name) Example: HTTP.REQ.USER.IS_MEMBER_OF(grp1). This example returns true if the current AAA user is a member of group grp1. It returns TRUE if the user is a member of the group group_name.
HTTP.REQ.USER.NAME Example: HTTP.REQ.USER.NAME. This example returns the name of the user. This is the name used by the user for login unless it is overridden by name from the external authentication server.
HTTP.REQ.USER.PASSWD Example: HTTP.REQ.USER.PASSWD. This example returns the password of the user. It returns the password of the user.
HTTP.REQ.VERSION Example: HTTP.REQ.VERSION. This example returns HTTP version information.
HTTP.RES.BODY(<integer>) Example: HTTP.RES.BODY(100). It will return first 100 characters of HTTP Response body. If the length of the body is less than 100 then the whole body will result as output.
HTTP.RES.STATUS_MSG Example: HTTP.RES.STATUS_MSG. This example returns the status message of response. It can be “OK”, some error etc.
HTTP.RES.VERSION Example: HTTP.RES.VERSION. This example returns HTTP version information.
HTTP.REQ.URL.HOSTNAME.EQ(<hostname>) Example: HTTP.REQ.URL.HOSTNAME.EQ("abc.foo.com:8080"). This example returns true if hostname in URL is abc.foo.com:8080. It returns HTTP Host Name present in the URL.
HTTP.REQ.IS_NTLM_OR_NEGOTIATE Example: HTTP.REQ.IS_NTLM_OR_NEGOTIATE. This example returns TRUE if the request is part of NTLM or NEGOTIATE connection.
HTTP.REQ.URL.PATH.IGNORE_EMPTY_ELEMENTS Example: HTTP.REQ.URL.PATH. IGNORE_EMPTY_ELEMENTS.COUNT. If request URL has path (/123//24//15) elements as : 123,,24, ,15 then HTTP.REQ.URL.PATH.IGNORE_EMPTY_ELEMENTS.COUNT gives 4, whereas HTTP.REQ.URL.PATHS.COUNT gives 5. It ignores empty elements in the list.
HTTP.REQ.URL.QUERY.IGNORE_EMPTY_ELEMENTS Example: HTTP.REQ.URL.QUERY.IGNORE_EMPTY_ELEMENTS.COUNT. If request URL has path as : abc=1&&def=2&g=3&h=6 then HTTP.REQ.URL.QUERY.IGNORE_EMPTY_ELEMENTS.COUNT gives 4, whereas HTTP.REQ.URL.QUERY.COUNT gives 5. It ignores empty elements in the list.

Expression prefixes for text in HTTP requests and responses

In this article