|Function||avi.http.add_cookie( table )|
|Description||Insert a new cookie or cookies into the HTTP request or response. If the cookie already exists, Vantage will append the specified value or flags to the existing cookie.|
|Parameter||A table of cookie name-value pairs for HTTP request contex) and optionally additional cookie attribute value pairs such as path, domain, etc for HTTP response.|
|Request Parameter||HTTP Request event: The cookie name value pairs are added in the Cookie header of the HTTP request, and if no such header exists then the Cookie header is added.
avi.http.add_cookie( name1, value1 [, name2, value2] )
name is the name of the new cookie.
In the HTTP request context, all arguments are treated as cookie name value pairs, i.e. the function ignores cookie attributes such as "Domain", "Path", etc. and will treat them as another cookie to be added.
|Response Parameter||HTTP Response event: When called in an HTTP response context, the cookie name value pairs are added in the Set-Cookie header of the HTTP response. If no such header exists the Set-Cookie header is created. |
In the HTTP response context, only the first two arguments are treated as cookie name value pairs and the subsequent arguments are interpreted as cookie attributes such as Domain", "Path", etc. and their corresponding values.
avi.http.add_cookie( name, value, path, domain, expires, maxage, httponly, secure )
name is the name of the new cookie. Example method 2: Add two cookies: jsessionid=123 and lang=en Set-Cookie: jsessionid=123; path=/; domain=www.avinetworks.com
Example method 2: Add two cookies: jsessionid=123 and lang=en
Set-Cookie: jsessionid=123; path=/; domain=www.avinetworks.com