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

Inherits: Progress.Lang.Object
Implements: OpenEdge.Net.HTTP.IHttpMessage, OpenEdge.Core.ISupportInitialize, OpenEdge.Core.IAdaptable
ABSTRACT

Copyright (c) 2014-2016 by Progress Software Corporation. All rights reserved.
File:HttpMessage
Author(s):pjudge
Created:Mon Feb 17 14:34:39 EST 2014




Method Summary
Options Name Purpose
ClearCookies () /** Removes all cookies from this message */
ClearHeaders () /** Removes all headers from this message */
Destroy ()
Progress.Lang.Object GetAdapter (Class) /* Returns an adapter for this message @param P.L.Class The type we want to adapt this message to @return P.L.Object The adapter. Will typically be of the type specified by the input argument */
OpenEdge.Net.HTTP.Cookie GetCookie (character) /** Returns a cookie by name from this message. Typically returns the first cookie it finds by name, oif more than one exist @param character The cookie's name to check @return Cookie The (first) cookie found by name */
INTEGER GetCookies (Cookie[]) /** Returns all the cookies for this message @param Cookie[] An array of cookies @return integer The number of cookies returned */
OpenEdge.Net.HTTP.HttpHeader GetHeader (character) /** Returns a named header @param character The name of the header to retrieve @return HttpHeader The header object. Null if not exists. */
INTEGER GetHeaders (HttpHeader[]) /** Returns all the headers (Names and values) @param HttpHeader[] An array of headers @return integer The number of headers returned */
LOGICAL HasCookie (character) /** Indicates whether a cookie exists for this message @param character The cookie's name to check @return logical TRUE if this message contains the cookie */
LOGICAL HasCookie (Cookie) /** Indicates whether a cookie exists for this message @param Cookie The cookie to check @return logical True if this message contains the cookie */
LOGICAL HasHeader (character) /** Indicates whether a header exists for this message or not. @param character The name of a header to check @return logical True if this message contains the header */
Initialize ()
RemoveCookie (character) /** Removes cookies from this message for a given name @param character The name of the cookie(s) to remove. */
RemoveCookie (Cookie) /** Removes a cookie from this request @param Cookie The cookie to remove. */
RemoveHeader (character) /** Removes a header from the collection of message headers. No-op if none exists. This implementation sets the value of the header to ?/unknown, passes it down the filter chain, and then removes it from the header collection. @param character The name of the header to remove */
SetCookie (Cookie) /** Adds a cookie to this request @param Cookie The cookie to add. */
SetHeader (HttpHeader) /** Adds header info to this message's collection of headers. @param character The header name @param character The complete header value */

Constructor Summary
Options Name Purpose
HttpMessage () /** Default constructor. */

Property Summary
Options Name Purpose
CHARACTER CharacterEncoding /** The message's content type encoding (eg charset='utf-8'). For more detail, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 */
INTEGER ContentLength /** The length (in bytes/characters) of the payload/entity. */
RAW ContentMD5 /** An MD5 hash of the message's content. */
CHARACTER ContentType /** The message's content type (eg text/html). For more detail, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 */
OpenEdge.Core.Collections.IStringKeyedMap Cookies /** Only cookies relevant to only this message (request or response) */
Progress.Lang.Object Entity /** Object containing the response body/entity. The object can be of any type, which may depend on the content type and the body filters it passes through. */
OpenEdge.Net.HTTP.HttpHeaderCollection Headers /** Holds headers for this message */
CHARACTER TransferEncoding /** The message's Transfer-Encoding. For more detail, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 This property does not use the same mechanism that the ContentType does, since the header name used depends on whether this is a request or response. */
CHARACTER Version /** The HTTP version supported. Typically HTTP/1.1 */


Method Detail
Top

ClearCookies ()

Purpose: Removes all cookies from this message
Top

ClearHeaders ()

Purpose: Removes all headers from this message
Top

Destroy ()

Top

Progress.Lang.Object GetAdapter (Class)

/* Returns an adapter for this message
Parameters:
poAdaptTo Progress.Lang.Class
Returns Progress.Lang.Object
P.L.Object The adapter. Will typically be of the type specified by the input argument
Top

OpenEdge.Net.HTTP.Cookie GetCookie (character)

Purpose: Returns a cookie by name from this message. Typically
returns the first cookie it finds by name, oif more than
one exist
Parameters:
pcName CHARACTER
Returns OpenEdge.Net.HTTP.Cookie
Cookie The (first) cookie found by name
Top

INTEGER GetCookies (Cookie[])

Purpose: Returns all the cookies for this message
Parameters:
poCookies OpenEdge.Net.HTTP.Cookie
Returns INTEGER
integer The number of cookies returned
Top

OpenEdge.Net.HTTP.HttpHeader GetHeader (character)

Purpose: Returns a named header
Parameters:
pcName CHARACTER
Returns OpenEdge.Net.HTTP.HttpHeader
HttpHeader The header object. Null if not exists.
Top

INTEGER GetHeaders (HttpHeader[])

Purpose: Returns all the headers (Names and values)
Parameters:
poHeaders OpenEdge.Net.HTTP.HttpHeader
Returns INTEGER
integer The number of headers returned
Top

LOGICAL HasCookie (character)

Purpose: Indicates whether a cookie exists for this message
Parameters:
pcName CHARACTER
Returns LOGICAL
logical TRUE if this message contains the cookie
Top

LOGICAL HasCookie (Cookie)

Purpose: Indicates whether a cookie exists for this message
Parameters:
poCookie OpenEdge.Net.HTTP.Cookie
Returns LOGICAL
logical True if this message contains the cookie
Top

LOGICAL HasHeader (character)

Purpose: Indicates whether a header exists for this message or not.
Parameters:
pcName CHARACTER
Returns LOGICAL
logical True if this message contains the header
Top

Initialize ()

Top

RemoveCookie (character)

Purpose: Removes cookies from this message for a given name
Parameters:
pcName CHARACTER
Top

RemoveCookie (Cookie)

Purpose: Removes a cookie from this request
Parameters:
poCookie OpenEdge.Net.HTTP.Cookie
Top

RemoveHeader (character)

Purpose: Removes a header from the collection of message headers.
No-op if none exists.
This implementation sets the value of the header to ?/unknown,
passes it down the filter chain, and then removes it from the
header collection.
Parameters:
pcName CHARACTER
Top

SetCookie (Cookie)

Purpose: Adds a cookie to this request
Parameters:
poCookie OpenEdge.Net.HTTP.Cookie
Top

SetHeader (HttpHeader)

Purpose: Adds header info to this message's collection of headers.
Parameters:
poHeader OpenEdge.Net.HTTP.HttpHeader


Constructor Detail
Top

HttpMessage ()

Purpose: Default constructor.


Property Detail
Top

CHARACTER CharacterEncoding

Purpose: The message's content type encoding (eg charset='utf-8'). For more detail, see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
Returns CHARACTER
Top

INTEGER ContentLength

Purpose: The length (in bytes/characters) of the payload/entity.
Returns INTEGER
Top

RAW ContentMD5

Purpose: An MD5 hash of the message's content.
Returns RAW
Top

CHARACTER ContentType

Purpose: The message's content type (eg text/html). For more detail, see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
Returns CHARACTER
Top

OpenEdge.Core.Collections.IStringKeyedMap Cookies

Purpose: Only cookies relevant to only this message (request or response)
Returns OpenEdge.Core.Collections.IStringKeyedMap
Top

Progress.Lang.Object Entity

Purpose: Object containing the response body/entity.
The object can be of any type, which may depend on the content type
and the body filters it passes through.
Returns Progress.Lang.Object
Top

OpenEdge.Net.HTTP.HttpHeaderCollection Headers

Purpose: Holds headers for this message
Returns OpenEdge.Net.HTTP.HttpHeaderCollection
Top

CHARACTER TransferEncoding

Purpose: The message's Transfer-Encoding. For more detail, see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6
This property does not use the same mechanism that the ContentType does,
since the header name used depends on whether this is a request or response.
Returns CHARACTER
Top

CHARACTER Version

Purpose: The HTTP version supported. Typically HTTP/1.1
Returns CHARACTER


Copyright © 2017 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7