beautypg.com

Os_http_request::headers_as_string, Input parameters, Return values – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 72: Example, Context, Usage

background image

60

Brocade Virtual ADX OpenScript API Guide

53-1003243-01

Methods

5

Input Parameters

The following table contains the input values.

Return Values

None

Example

OS_HTTP_REQUEST::headers_as_string

Returns a string representation of all HTTP request headers.

Context

This function called in http response context will have no effect.

Usage

Can be used to retrieve the HTTP headers and to parse in the script.

Input Parameters

None.

Return Values

The following table contains the return values.

TABLE 60

Input Values

Name

Type

Description

$domain_value

string

A string representing the value of the domain name.

$status_code

integer

An integer representing the status code.

$url_value

string

A string representing the value of the URL.

$port_value

integer

An integer representing the value of the port.

TABLE 61

Return Values

Name

Type

Description

string

A string representing all HTTP
request headers.

use OS_HTTP_REQUEST;

sub HTTP_REQUEST {

OS_HTTP_REQUEST::redirect(domain=>'www.brocade.com', port=>'80');

}