Namespace: OpenEdge.Net.HTTP
Class
HttpHeader
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object

Copyright (c) 2015-2016 by Progress Software Corporation. All rights reserved.
File:HttpHeader
Purpose:A basic HTTP header. Can be extended for headers that have multi-part values
(like Content-Type which has an optional charset= part.
Author(s):pjudge
Created:Wed Feb 11 11:49:10 EST 2015




Method Summary
Options Name Purpose
ClearParams () /** Removes any parameter records for this header. */
ExtractParameters () /** Extracts/separates any parameters from the header's value, and stores the 'clean' value. */
CHARACTER GetBaseValue () /** Returns the unparameterised value for this header. @return character The value. */
CHARACTER GetParameterValue (character) /** Returns a parameter from a (for example, 'charset' from Content-Type) header value @param character The name of the parameter value to retrieve @return character The charset paremeter value; blank/empty otherwise */
CHARACTER GetParameterValues () /** Returns the unparameterised value for this header. @return character The value. */
CHARACTER GetValue () /* Overridable accessor method @return character The Value */
LOGICAL HasParameter (character) /** Indicates whether a parameter exists in the header @param character The name of the parameter to check. @return logical True if the parameter exists. */
LOGICAL RemoveParameters (character) /* Removes all parameters in this header with a name @param character the parameter name @return logical TRUE if at least one parameter was removed. */
LOGICAL SetParameterValue (character, character) /** Returns a parameter from a (for example, 'charset' from Content-Type) header value @param character The name of the parameter value to retrieve @param character The charset paremeter value; blank/empty otherwise @param character The character used to separate param name/value pairs @return logical True when the parameter was replaced/previously existed. */
SetValue (character) /* Overridable mutator method @param character The header value */
CHARACTER ToString () /* Returns a stringified version of this header object @return character A stringified representation of this object */
Validate (character) /* Validates a header value. Should throw an error if the value is not valid. @param character The (prospective) header value */

Constructor Summary
Options Name Purpose
HttpHeader ()
HttpHeader (character) /** Constructor @param character The header name */
HttpHeader (character, character) /** Constructor @param character The header name @param character The header value */

Property Summary
Options Name Purpose
CHARACTER Name /** (mandatory) The name of the header */
OpenEdge.Net.HTTP.HttpHeader NullHeader /* A null header allows chaining of GetHeader() calls even if there is no header defined. */
CHARACTER ParamDelimiter /** (optional) delimiter for header parameters */
CHARACTER Value /** A header value */


Method Detail
Top

ClearParams ()

Purpose: Removes any parameter records for this header.
Top

ExtractParameters ()

Purpose: Extracts/separates any parameters from the header's value, and stores the 'clean' value.
Top

CHARACTER GetBaseValue ()

Purpose: Returns the unparameterised value for this header.
Returns CHARACTER
character The value.
Top

CHARACTER GetParameterValue (character)

Purpose: Returns a parameter from a (for example, 'charset' from Content-Type) header value
Parameters:
pcParamName CHARACTER
Returns CHARACTER
character The charset paremeter value; blank/empty otherwise
Top

CHARACTER GetParameterValues ()

Purpose: Returns the unparameterised value for this header.
Returns CHARACTER
character The value.
Top

CHARACTER GetValue ()

/* Overridable accessor method
Returns CHARACTER
character The Value
Top

LOGICAL HasParameter (character)

Purpose: Indicates whether a parameter exists in the header
Parameters:
pcParamName CHARACTER
Returns LOGICAL
logical True if the parameter exists.
Top

LOGICAL RemoveParameters (character)

/* Removes all parameters in this header with a name
Parameters:
pcParamName CHARACTER
Returns LOGICAL
logical TRUE if at least one parameter was removed.
Top

LOGICAL SetParameterValue (character, character)

Purpose: Returns a parameter from a (for example, 'charset' from Content-Type) header value
Parameters:
pcParamName CHARACTER
pcParamValue CHARACTER
Returns LOGICAL
logical True when the parameter was replaced/previously existed.
Top

SetValue (character)

/* Overridable mutator method
Parameters:
pcValue CHARACTER
Top

CHARACTER ToString ()

/* Returns a stringified version of this header object
Returns CHARACTER
character A stringified representation of this object
Top

Validate (character)

/* Validates a header value. Should throw an error if the value
is not valid.
Parameters:
pcValue CHARACTER


Constructor Detail
Top

HttpHeader ()

Top

HttpHeader (character)

Purpose: Constructor
Parameters:
pcName CHARACTER
Top

HttpHeader (character, character)

Purpose: Constructor
Parameters:
pcName CHARACTER
pcValue CHARACTER


Property Detail
Top

CHARACTER Name

Purpose: (mandatory) The name of the header
Returns CHARACTER
Top

OpenEdge.Net.HTTP.HttpHeader NullHeader

/* A null header allows chaining of GetHeader() calls even if
there is no header defined.
Returns OpenEdge.Net.HTTP.HttpHeader
Top

CHARACTER ParamDelimiter

Purpose: (optional) delimiter for header parameters
Returns CHARACTER
Top

CHARACTER Value

Purpose: A header value
Returns CHARACTER


Copyright © 2017 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7