beautypg.com

Os_http_response::version, Os_http_response::version ($val), Example – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 77: Context, Usage, Input parameters, Return values

background image

Brocade Virtual ADX OpenScript API Guide

65

53-1003243-01

Methods

6

Example

OS_HTTP_RESPONSE::version

Returns the response version specified in the HTTP response header if it exists otherwise it returns
NULL.

Context

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

Usage

Can be used to retrieve the version.

Input Parameters

None.

Return Values

The following table contains the return values.

Example

OS_HTTP_RESPONSE::version ($val)

Sets the version specified by $val.

Context

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

TABLE 64

Return Values

Name

Type

Description

string

The value of the response
version if present otherwise
undefined.

use OS_HTTP_RESPONSE;

sub HTTP_RESPONSE{

OS_HTTP_RESPONSE::code(”200”);

}

use OS_HTTP_RESPONSE;

sub HTTP_RESPONSE{

my $version = OS_HTTP_RESPONSE::version;

if(defined $version && version eq "1.0") {

OS_HTTP_RESPONSE::version("1.1");

}

}