beautypg.com

Os_http_request::cookie ($name, $value), Return values, Example – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 69: Context, Usage, Input parameters

background image

Brocade Virtual ADX OpenScript API Guide

57

53-1003243-01

Methods

5

Return Values

The following table contains the return values.

Example

OS_HTTP_REQUEST::cookie ($name, $value)

Sets the cookie value specified by $name.

Context

HTTP request event. If called in the HTTP response context, undefined will be returned.

Usage

Can be used to rewrite the cookie value.

Input Parameters

The following table contains the input values.

Return Values

None

Example

TABLE 56

Return Values

Name

Type

Description

string

Value of the cookies specified by $name.
If not present, undefined is returned.

TABLE 57

Input Values

Name

Type

Description

$name

string

A string representing the cookie
name.

$value

string

A string representing the cookie
value.

use OS_HTTP_REQUEST;

sub HTTP_REQUEST{

my $server_id = OS_HTTP_REQUEST::cookie("ServerID");

}

use OS_HTTP_REQUEST;

sub HTTP_REQUEST{

OS_HTTP_REQUEST::cookie("ServerID", $server_id);

}