beautypg.com

Os_http_response::content_type, Context, Input parameters – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 85: Return values, Example, Usage

background image

Brocade Virtual ADX OpenScript API Guide

73

53-1003243-01

Methods

6

NOTE

This API will remove all headers with a value specified by the $name variable (case insensitive). For
example, OS_HTTP_RESPONSE::remove_all_headers("X-Forwarded-For") will remove ALL
occurrences of headers by that name (case insensitive).

Context

This function called in a context other than the http response context will have no effect.

Input Parameters

The following table contains the input values.

Return Values

None

Example

OS_HTTP_RESPONSE::content_type

Returns response content type specified in the HTTP response if it exists, otherwise it will return
NULL.

Context

Called in the HTTP request context, undefined will be returned.

Usage

Can be used to retrieve the content type.

Input Parameters

None.

TABLE 76

Input Values

Name

Type

Description

$name

string

A string representing the name
of an HTTP response header.

use OS_HTTP_RESPONSE;

sub HTTP_RESPONSE{

OS_HTTP_RESPONSE::remove_all_headers("my-header");

}