Namespace: OpenEdge.Web
Class
WebRequest
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object
Implements: OpenEdge.Web.IWebRequest

Copyright (c) 2015-2016 by Progress Software Corporation. All rights reserved.
Purpose:An HttpRequest that adds request context information
Author(s):mbanks
Created:Fri Apr 24 14:07:54 EDT 2015
Notes:The assumption is that this is created on each web request
DO NOT KEEP ALIVE BETWEEN REQUESTS.
@since:11.6




Method Summary
Options Name Purpose
ClearCookies () /** Removes all cookies is not implemented */
ClearHeaders () /** Remove all headers is not implemented . */
OpenEdge.Core.Collections.IStringStringMap createQueryMapFromContext () /** creates a query map from the quesry string to pass to URI constructor*/
LONGCHAR GetContextValue (character) /** Get a value from the request context */
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 The name of the header to retrieve @return HttpHeader The header object. Null if not exists. */
INTEGER GetHeaders (HttpHeader[]) /** Returns all the headers Note: As of current this is not cached The assumption is that you will not call this multiple times per request since there is a getHeader(name) (which does not use this). @param HttpHeader[] An array of headers @return integer The number of headers returned */
CHARACTER GetHeaderValue (character) /* get the heder value as string - used by GetHeader and HasHeader */
CHARACTER GetMethodNotImplementedMessage () /** return not implemented message for method- must be called from the method **/
CHARACTER GetPathParameter (character) /** get the named path value from the URI (see IWebRequest) */
CHARACTER GetPropNotImplementedMessage () /** return not implemented message for property - must be called from setter and/or getter **/
CHARACTER GetReadOnlyMessage () /** return read only message for property - must be called from setter **/
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 */
LoadCookies () /* Private method */
RemoveCookie (character) /** Removes cookies from this message for a given name @param character The name of the cookie(s) to remove. */
RemoveCookie (Cookie) /** Remove cookie is not implemented @param Cookie The cookie to remove. */
RemoveHeader (character) /** Removes headers is not implemented . @param character The name of the header to remove */
SetCookie (Cookie) /** Set cookie is not implemented */
SetHeader (HttpHeader) /** Set header is not implemented */

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 */
CHARACTER ContextNames /** Returns a list of all context property names */
CHARACTER DefaultCookieDomain /** Returns the default cookie domain */
CHARACTER DefaultCookiePath /** Returns the default cookie path */
Progress.Lang.Object Entity /** Object containing the message body/entity. The object can be of any type, which may depend on the content type. The Entity is the 'programmer-readable' version of the message body: it's the formatted, strongly-typed version */
CHARACTER LocalAddress /** IP address of the interface on which the request was received */
CHARACTER LocalHost /** Host name of the interface on which the request was received */
INTEGER LocalPort /** Port number of the interface on which the request was received */
CHARACTER Method /** (mandatory) GET/PUT/POST etc, Maps to MethodEnum, although there are extension methods too */
CHARACTER PathInfo /** The URL after the TransportPath. Does not include the query. */
CHARACTER PathParameterNames /** Returns a comma-delimited list of path parameter names, for URI mappings */
CHARACTER RemoteAddress /** IP address of the client or last proxy that sent the request */
CHARACTER RemoteHost /** Host name the client or the last proxy that sent the request */
INTEGER RemotePort /** Port of the client or last proxy that sent the request */
CHARACTER RemoteUser /** Login of the user making this request, or null if not authenticated */
CHARACTER ResolvedTransportPath /** The real path to the part of the URL specified by TransportPath */
CHARACTER ServerSoftware /** Return the server software */
CHARACTER TransferEncoding /** The message's Transfer-Encoding. For more detail, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 */
CHARACTER TransportPath /** The part of this request's URL that specifies the OE transport */
OpenEdge.Net.URI URI /** (mandatory) The URI to request eg. http://progress.com/ */
CHARACTER UriTemplate /* Returns the URI template used to find the handler for this request. May be empty */
CHARACTER Version /** The HTTP version supported. Typically HTTP/1.1 */
CHARACTER WebAppPath /** Portion of request URI that indicates the web application. */


Method Detail
Top

ClearCookies ()

Purpose: Removes all cookies is not implemented
Top

ClearHeaders ()

Purpose: Remove all headers is not implemented .
Top

OpenEdge.Core.Collections.IStringStringMap createQueryMapFromContext ()

Purpose: creates a query map from the quesry string to pass to URI constructor
Returns OpenEdge.Core.Collections.IStringStringMap
Top

LONGCHAR GetContextValue (character)

Purpose: Get a value from the request context
Parameters:
pcName CHARACTER
Returns LONGCHAR
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
Note: As of current this is not cached
The assumption is that you will not call this multiple times per request
since there is a getHeader(name) (which does not use this).
Parameters:
poHeaders OpenEdge.Net.HTTP.HttpHeader
Returns INTEGER
integer The number of headers returned
Top

CHARACTER GetHeaderValue (character)

/* get the heder value as string - used by GetHeader and HasHeader
Parameters:
pcName CHARACTER
Returns CHARACTER
Top

CHARACTER GetMethodNotImplementedMessage ()

Purpose: return not implemented message for method- must be called from the method
Returns CHARACTER
Top

CHARACTER GetPathParameter (character)

Purpose: get the named path value from the URI (see IWebRequest)
Parameters:
pcName CHARACTER
Returns CHARACTER
Top

CHARACTER GetPropNotImplementedMessage ()

Purpose: return not implemented message for property - must be called from setter and/or getter
Returns CHARACTER
Top

CHARACTER GetReadOnlyMessage ()

Purpose: return read only message for property - must be called from setter
Returns CHARACTER
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

LoadCookies ()

/* Private method
Top

RemoveCookie (character)

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

RemoveCookie (Cookie)

Purpose: Remove cookie is not implemented
Parameters:
poCookie OpenEdge.Net.HTTP.Cookie
Top

RemoveHeader (character)

Purpose: Removes headers is not implemented .
Parameters:
pcName CHARACTER
Top

SetCookie (Cookie)

Purpose: Set cookie is not implemented
Parameters:
poCookie OpenEdge.Net.HTTP.Cookie
Top

SetHeader (HttpHeader)

Purpose: Set header is not implemented
Parameters:
poHeader OpenEdge.Net.HTTP.HttpHeader


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

CHARACTER ContextNames

Purpose: Returns a list of all context property names
Returns CHARACTER
Top

CHARACTER DefaultCookieDomain

Purpose: Returns the default cookie domain
Returns CHARACTER
Top

CHARACTER DefaultCookiePath

Purpose: Returns the default cookie path
Returns CHARACTER
Top

Progress.Lang.Object Entity

Purpose: Object containing the message body/entity. The object can be of any type,
which may depend on the content type.
The Entity is the 'programmer-readable' version of the message body: it's
the formatted, strongly-typed version
Returns Progress.Lang.Object
Top

CHARACTER LocalAddress

Purpose: IP address of the interface on which the request was received
Returns CHARACTER
Top

CHARACTER LocalHost

Purpose: Host name of the interface on which the request was received
Returns CHARACTER
Top

INTEGER LocalPort

Purpose: Port number of the interface on which the request was received
Returns INTEGER
Top

CHARACTER Method

Purpose: (mandatory) GET/PUT/POST etc, Maps to MethodEnum, although there are extension methods too
Returns CHARACTER
Top

CHARACTER PathInfo

Purpose: The URL after the TransportPath. Does not include the query.
Returns CHARACTER
Top

CHARACTER PathParameterNames

Purpose: Returns a comma-delimited list of path parameter names, for URI mappings
Returns CHARACTER
Top

CHARACTER RemoteAddress

Purpose: IP address of the client or last proxy that sent the request
Returns CHARACTER
Top

CHARACTER RemoteHost

Purpose: Host name the client or the last proxy that sent the request
Returns CHARACTER
Top

INTEGER RemotePort

Purpose: Port of the client or last proxy that sent the request
Returns INTEGER
Top

CHARACTER RemoteUser

Purpose: Login of the user making this request, or null if not authenticated
Returns CHARACTER
Top

CHARACTER ResolvedTransportPath

Purpose: The real path to the part of the URL specified by TransportPath
Returns CHARACTER
Top

CHARACTER ServerSoftware

Purpose: Return the server software
Returns CHARACTER
Top

CHARACTER TransferEncoding

Purpose: The message's Transfer-Encoding. For more detail, see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6
Returns CHARACTER
Top

CHARACTER TransportPath

Purpose: The part of this request's URL that specifies the OE transport
Returns CHARACTER
Top

OpenEdge.Net.URI URI

Purpose: (mandatory) The URI to request eg. http://progress.com/
Returns OpenEdge.Net.URI
Top

CHARACTER UriTemplate

/* Returns the URI template used to find the handler for this request. May be empty
Returns CHARACTER
Top

CHARACTER Version

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

CHARACTER WebAppPath

Purpose: Portion of request URI that indicates the web application.
Returns CHARACTER


Copyright © 2017 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7