Namespace: OpenEdge.Net
Type: Class URI
Parent Classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object


Copyright (c) 2014-2019 by Progress Software Corporation. All rights reserved.
File:URI
Purpose:A generic URI object, useful for making request over a network
Author(s):pjudge
Created:Wed Dec 18 13:02:50 EST 2013
Notes:* W3C spec at http://tools.ietf.org/html/rfc3986
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
ALPHA / DIGIT / "-" / "." / "_" / "~" /
"!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" /
":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Default:unreserved
Query:query = *( pchar / "/" / "?" )
ALPHA / DIGIT / "-" / "." / "_" / "~" /
"!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" /
":" / "@" /
"/" / "?"
Scheme:scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
Fragment:fragment = *( pchar / "/" / "?" )
Path:path-abempty = *( "/" segment )
segment = *pchar
UserInfo:userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
Host:host = IP-literal / IPv4address / reg-name
reg-name = *( unreserved / pct-encoded / sub-delims )
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255



Method Summary
  Options Name Purpose
  AddPathSegment (character) /* Adds/appends a segment to the Path property Will %-encode the segment value Empty/blank segments are ignored @param character A path segment */
  AddQuery (character) /** Adds a name-only QueryMap argument. Equivalent to calling AddQueryMap(pcname, ?). @param character The QueryMap name */
  AddQuery (character, character) /** Adds a query argument @param character The query name @param character The query value */
  AddQueryString (character, logical) /** Parses a string containing a URI's QUERY and adds it to this URI @param character A query string @param logical TRUE if the incoming strings should be URL-decoded */
  BuildUri () /* constructs a string representation */
  CHARACTER Decode () /** Attempts to decode a previously-encoded URL. @return character A decoded URL */
  CHARACTER Decode (character) /** Attempts to decode a previously-encoded string. @param character The string to decode @return character A decoded URL @throws AppError If the encoding is malformed */
  CHARACTER Decode (character, character) /** Attempts to decode a previously-encoded string. @param character The string to decode @param character The target codepage to encode into. Defaults to CPINTERNAL @return character A decoded URL @throws AppError If the encoding is malformed */
  CHARACTER Decode (String) /** Attempts to decode a previously-encoded string. @param String The string to decode @throws AppError If the encoding is malformed */
  CHARACTER Encode () /** Encodes this URI @return character An encoded version of the URI */
  CHARACTER Encode (character, UriEncodingTypeEnum) /** Encodes a string for a particular purpose. Usage of Encode<encoding-type> is recommended. The method does NOT re-encode % characters. @param character The string to encode @param EncondingTypeEnum The type of encoding to apply @return character the encoded string */
  CHARACTER Encode (character, UriEncodingTypeEnum, logical) /** Encodes a string for a particular purpose. Usage of Encode<encoding-type> is recommended, unless the re-encoding of % characters is desired. @param character The string to encode @param EncondingTypeEnum The type of encoding to apply @param logical TRUE if any percent characters should be encoded as %25 @return character the encoded string */
  CHARACTER Encode (URI) /** Encodes a URI. @param URI The URI to encode @param character A character representaion of the URI */
  CHARACTER EncodeCookie (character) /* Encodes a string per Cookie encoding rules. This method is here for historical reasons. Cookie US-ASCII characters excluding CTLs, whitespace (32) DQUOTE (34), comma (44), semicolon (59), and backslash (92) @param character A string to encode @return character An encoded string */
  CHARACTER EncodeCookie (String) /* Encodes a string per Cookie encoding rules. This method is here for historical reasons. Cookie US-ASCII characters excluding CTLs, whitespace (32) DQUOTE (34), comma (44), semicolon (59), and backslash (92) @param String A string to encode @return character An encoded string */
  CHARACTER EncodeFragment () /* Encodes this URI's Fragment per URI Fragment encoding rules @return character An encoded string */
  CHARACTER EncodeFragment (character) /* Encodes a string per URI Fragment encoding rules https://tools.ietf.org/html/rfc3986#page-11 unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" pchar = unreserved / pct-encoded / sub-delims / ":" / "@" Fragment : fragment = *( pchar / "/" / "?" ) @param character A string to encode @return character An encoded string */
  CHARACTER EncodeFragment (String) /* Encodes a string per URI Fragment encoding rules https://tools.ietf.org/html/rfc3986#page-11 unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" pchar = unreserved / pct-encoded / sub-delims / ":" / "@" Fragment : fragment = *( pchar / "/" / "?" ) @param String A string to encode @return character An encoded string */
  CHARACTER EncodeHost () /* Encodes this uri's Host per URI Host encoding rules @return character An encoded string */
  CHARACTER EncodeHost (character) /* Encodes a string per URI Host encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" Host = *( unreserved / pct-encoded / sub-delims ) @param character A string to encode @return character An encoded string */
  CHARACTER EncodeHost (String) /* Encodes a string per URI Host encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" Host = *( unreserved / pct-encoded / sub-delims ) @param String A string to encode @return character An encoded string */
  CHARACTER EncodePath (character) /* Encodes a string per URI Path encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" Path = 1*( unreserved / pct-encoded / sub-delims / "@" ) @param character A string to encode @return character An encoded string */
  CHARACTER EncodePath (String) /* Encodes a string per URI Path encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" Path = 1*( unreserved / pct-encoded / sub-delims / "@" ) @param String A string to encode @return character An encoded string */
  CHARACTER EncodeQuery () /* Encodes this URI's Query string per URI Query encoding rules. @return character An encoded path string */
  CHARACTER EncodeQuery (character) /* Encodes a string per URI Query encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" pchar = unreserved / pct-encoded / sub-delims / ":" / "@" Query = *( pchar / "/" / "?" ) @param character A string to encode @return character An encoded string */
  CHARACTER EncodeQuery (String) /* Encodes a string per URI Query encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" pchar = unreserved / pct-encoded / sub-delims / ":" / "@" Query = *( pchar / "/" / "?" ) @param String A string to encode @return character An encoded string */
  CHARACTER EncodeQuery (URI) /* Encodes a URI's Path string per URI Path encoding rules. This is a separate method since we store the Path whole and so you cannot simply call EncodePath(uri:Path) since that will encode the path delimiters that you need unencoded. @param URI A URI whose path to encode @return character An encoded path string */
  CHARACTER EncodeScheme () /* Encodes this URI's scheme per URI Scheme encoding rules @return character An encoded string */
  CHARACTER EncodeScheme (character) /* Encodes a string per URI Scheme encoding rules https://tools.ietf.org/html/rfc3986#page-11 Scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) @param character A string to encode @return character An encoded string */
  CHARACTER EncodeScheme (String) /* Encodes a string per URI Scheme encoding rules https://tools.ietf.org/html/rfc3986#page-11 Scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) @param String A string to encode @return character An encoded string */
  CHARACTER EncodeString (character) /* Encodes a string per URI Default encoding rules https://tools.ietf.org/html/rfc3986#page-11 Default = unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" @param character A string to encode @return character An encoded string */
  CHARACTER EncodeString (character, character, logical[128], logical) /* Encodes a string per the input flags @param character The string to encode @param character The codepage of the input/source string @param logical[128] An array of flags indicating which ASCII chars to encode @param logical TRUE if existing % values must be reencoded as %25 @return character The encoded string */
  CHARACTER EncodeString (String) /* Encodes a string per URI Default encoding rules https://tools.ietf.org/html/rfc3986#page-11 Default = unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" @param String A string to encode @return character An encoded string */
  CHARACTER EncodeURI (URI) /** Encodes a URI. @param URI The URI to encode @param character A character representaion of the URI */
  CHARACTER EncodeUserinfo () /* Encodes this uri's Host per URI Host encoding rules @return character An encoded string */
  CHARACTER EncodeUserinfo (character) /* Encodes a string per URI userinfo encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" Host = *( unreserved / pct-encoded / sub-delims / ":" ) @param character A string to encode @return character An encoded string */
  CHARACTER EncodeUserinfo (String) /* Encodes a string per URI userinfo encoding rules https://tools.ietf.org/html/rfc3986#page-11 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" Host = *( unreserved / pct-encoded / sub-delims / ":" ) @param String A string to encode @return character An encoded string */
  INTEGER GetPathSegments (character[]) /* Helper method to return the path as an array of segments. @return character[] An array of path segments. */
  OpenEdge.Core.Collections.IStringStringMap GetQueryMap () /** Gets the complete set of query names and values. @return IStringStringMap A map of query names and values */
  INTEGER GetQueryNames (character[]) /** Returns an array of query names @param character[] An array @return integer The number */
  CHARACTER GetQueryValue (character) /** Get a char query value from the query @param character The query name */
  LOGICAL HasQueryName (character) /** Returns an array of query names @param character The query name,. @return logical TRUE if the URI has the given query string */
  CHARACTER MergePath (character[5], character[5]) /* Merges a relative path into a base path, as per https://tools.ietf.org/html/rfc3986#section-5.2.3 . @param character[5] The split base URI @param character[5] The split relative URI @return character The merged path */
  OpenEdge.Net.URI Parse (character) /** Parses a string containing a URI and creates a URI object from it @param character a string URI (eg http://www.progress.com/) @return URI A URI representation of the string. */
  OpenEdge.Net.URI Parse (character, logical) /** Parses a string containing a URI and creates a URI object from it @param character a string URI (eg http://www.progress.com/) @param logical TRUE if the incoming strings should be URL-decoded @return URI A URI representation of the string. */
  CHARACTER RemoveDotSegments (character) /* Removes any dot segments in a path string, per the rules at https://tools.ietf.org/html/rfc3986#section-5.2.4 @param character The path string potentially containing "." or ".." segments @return character The path with the "." and/or ".." segments removed and resolved */
  LOGICAL RemoveQuery (character) /* Removes a query parameter @param character The name of the query @return logical TRUE if the named query existed (before removal) */
  OpenEdge.Net.URI ResolveRelativeReference (URI, character) /* Resolve a relative URI reference to a base URI, as per RFC3986, at https://tools.ietf.org/html/rfc3986#section-5.2.2 . The relative URI reference does not have to be a complete URI - it may only have certain parts of a URI (like path only, or query only). @param URI The base URI @param character A string representation of a URI to merge/resolve into the base @return URI A resolved URI */
  SetAuthority (character, logical) /* Adds a URI's authority components to this instance @param character The authority to add @param logical TRUE if the authority needs to be decoded */
  SetPath (character) /* Sets this URI's complete Path. This replaces the existing path. @param character The complete to add */
  SetPath (character[]) /* Sets the Path property from an array of segments. Will %-encode the segment values Empty/blank segments are ignored Dotted paths are added as-is @param character[] An array of path segments. */
  SetQueryMap (IStringStringMap) /** Sets (merges) a set of query names and values into this URI @param IStringStringMap A map of query names and values */
  CHARACTER Split () /* Parses this URI into its component parts. @return character[] An array of component parts [1] scheme (http/https) [2] authority (host:port) [3] path [4] query [5] fragment */
  CHARACTER SplitUri (character) /* Parses an potentially-URI-containing string into URI component parts. This method will not fail, and will return empty values for an element of the URI if the string cannot be parsed or fails to parse somehow. So if the string contains http//example.com the auhority will be 'example.com' and the scheme empty (since there's no :). @param character A string URI (or part thereof) @return character[] An array of component parts [1] scheme (http/https) [2] authority (host:port) [3] path [4] query [5] fragment */
  CHARACTER ToString () /** Returns a string representation of this URI @return character The string URI */

Constructor Summary
  Options Name Purpose
  URI () /* Static constructor. Used to build lists of to-encode character flags */
  URI (character) /** Constructor. Defaults to HTTP scheme. @param character The host name. */
  URI (character, character) /** Constructor. @param character The scheme for this URI. @param character The host name. */
  URI (character, character, character, character, character) /** Constructor. @param character The scheme for this URI @param character The authority (contains at least host, and potentially port, user, passwd) @param character The path @param character The query string @param character The fragment */
  URI (character, character, integer) /** Constructor. @param character The scheme for this URI. @param character The host name. @param integer The port to use. */
  URI (character, character, integer, character, IStringStringMap, character) /** Constructor. @param character The scheme for this URI. @param character The host name. @param integer The port to use. @param character The path @param IStringStringMap the QueryMap arguments @param character The fragment, if any */

Property Summary
  Options Name Purpose
  INTEGER AUTHORITY_PART_IDX
  CHARACTER BaseURI
  CHARACTER Fragment
  INTEGER FRAGMENT_PART_IDX
  CHARACTER Host
  CHARACTER Password
  CHARACTER Path
  INTEGER PATH_PART_IDX
  INTEGER Port
  OpenEdge.Core.Collections.IStringStringMap QueryMap
  CHARACTER QueryString
  INTEGER QUERY_PART_IDX
  CHARACTER RelativeURI
  CHARACTER Scheme
  INTEGER SCHEME_PART_IDX
  CHARACTER User


Method Detail
Top

AddPathSegment (character)

/* Adds/appends a segment to the Path property
Will %-encode the segment value
Empty/blank segments are ignored
Parameters:
pcSegment CHARACTER
 
Top

AddQuery (character)

Purpose: Adds a name-only QueryMap argument. Equivalent to calling
AddQueryMap(pcname, ?).
Parameters:
pcName CHARACTER
 
Top

AddQuery (character, character)

Purpose: Adds a query argument
Parameters:
pcName CHARACTER
 
pcValue CHARACTER
 
Top

AddQueryString (character, logical)

Purpose: Parses a string containing a URI's QUERY and adds it to this URI
Parameters:
pQuery CHARACTER
 
pDecode LOGICAL
 
Top

BuildUri ()

/* constructs a string representation
Top

CHARACTER Decode ()

Purpose: Attempts to decode a previously-encoded URL.
Returns CHARACTER
  character A decoded URL
Top

CHARACTER Decode (character)

Purpose: Attempts to decode a previously-encoded string.
@throws AppError If the encoding is malformed
Parameters:
pcEncodedString CHARACTER
 
Returns CHARACTER
  character A decoded URL
Top

CHARACTER Decode (character, character)

Purpose: Attempts to decode a previously-encoded string.
@throws AppError If the encoding is malformed
Parameters:
pEncodedString CHARACTER
 
pTargetCodepage CHARACTER
 
Returns CHARACTER
  character A decoded URL
Top

CHARACTER Decode (String)

Purpose: Attempts to decode a previously-encoded string.
@throws AppError If the encoding is malformed
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
 
Top

CHARACTER Encode ()

Purpose: Encodes this URI
Returns CHARACTER
  character An encoded version of the URI
Top

CHARACTER Encode (character, UriEncodingTypeEnum)

Purpose: Encodes a string for a particular purpose. Usage of Encode<encoding-type> is recommended.
The method does NOT re-encode % characters.
Parameters:
pcString CHARACTER
 
poEncodingType OpenEdge.Net.UriEncodingTypeEnum
 
Returns CHARACTER
  character the encoded string
Top

CHARACTER Encode (character, UriEncodingTypeEnum, logical)

Purpose: Encodes a string for a particular purpose. Usage of Encode<encoding-type> is recommended,
unless the re-encoding of % characters is desired.
Parameters:
pString CHARACTER
 
pEncodingType OpenEdge.Net.UriEncodingTypeEnum
 
pReEncode LOGICAL
 
Returns CHARACTER
  character the encoded string
Top

CHARACTER Encode (URI)

Purpose: Encodes a URI.
Parameters:
poURI OpenEdge.Net.URI
 
Returns CHARACTER
 
Top

CHARACTER EncodeCookie (character)

/* Encodes a string per Cookie encoding rules. This method is here for historical reasons.
Cookie US-ASCII characters excluding CTLs, whitespace (32) DQUOTE (34), comma (44), semicolon (59), and backslash (92)
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeCookie (String)

/* Encodes a string per Cookie encoding rules. This method is here for historical reasons.
Cookie US-ASCII characters excluding CTLs, whitespace (32) DQUOTE (34), comma (44), semicolon (59), and backslash (92)
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeFragment ()

/* Encodes this URI's Fragment per URI Fragment encoding rules
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeFragment (character)

/* Encodes a string per URI Fragment encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
Fragment : fragment = *( pchar / "/" / "?" )
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeFragment (String)

/* Encodes a string per URI Fragment encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
Fragment : fragment = *( pchar / "/" / "?" )
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeHost ()

/* Encodes this uri's Host per URI Host encoding rules
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeHost (character)

/* Encodes a string per URI Host encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Host = *( unreserved / pct-encoded / sub-delims )
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeHost (String)

/* Encodes a string per URI Host encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Host = *( unreserved / pct-encoded / sub-delims )
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodePath (character)

/* Encodes a string per URI Path encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Path = 1*( unreserved / pct-encoded / sub-delims / "@" )
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodePath (String)

/* Encodes a string per URI Path encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Path = 1*( unreserved / pct-encoded / sub-delims / "@" )
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeQuery ()

/* Encodes this URI's Query string per URI Query encoding rules.
Returns CHARACTER
  character An encoded path string
Top

CHARACTER EncodeQuery (character)

/* Encodes a string per URI Query encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
Query = *( pchar / "/" / "?" )
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeQuery (String)

/* Encodes a string per URI Query encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
Query = *( pchar / "/" / "?" )
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeQuery (URI)

/* Encodes a URI's Path string per URI Path encoding rules.
This is a separate method since we store the Path whole and
so you cannot simply call EncodePath(uri:Path) since that
will encode the path delimiters that you need unencoded.
Parameters:
poURI OpenEdge.Net.URI
 
Returns CHARACTER
  character An encoded path string
Top

CHARACTER EncodeScheme ()

/* Encodes this URI's scheme per URI Scheme encoding rules
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeScheme (character)

/* Encodes a string per URI Scheme encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
Scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeScheme (String)

/* Encodes a string per URI Scheme encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
Scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeString (character)

/* Encodes a string per URI Default encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
Default = unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeString (character, character, logical[128], logical)

/* Encodes a string per the input flags
Parameters:
pcString CHARACTER
 
pcSourceCodepage CHARACTER
 
pcEncodeFlags LOGICAL
 
plReEncode LOGICAL
 
Returns CHARACTER
  character The encoded string
Top

CHARACTER EncodeString (String)

/* Encodes a string per URI Default encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
Default = unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeURI (URI)

Purpose: Encodes a URI.
Parameters:
poURI OpenEdge.Net.URI
 
Returns CHARACTER
 
Top

CHARACTER EncodeUserinfo ()

/* Encodes this uri's Host per URI Host encoding rules
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeUserinfo (character)

/* Encodes a string per URI userinfo encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Host = *( unreserved / pct-encoded / sub-delims / ":" )
Parameters:
pcString CHARACTER
 
Returns CHARACTER
  character An encoded string
Top

CHARACTER EncodeUserinfo (String)

/* Encodes a string per URI userinfo encoding rules
https://tools.ietf.org/html/rfc3986#page-11 //tools.ietf.org/html/rfc3986#page-11
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Host = *( unreserved / pct-encoded / sub-delims / ":" )
Parameters:
pString OpenEdge.Core.String
 
Returns CHARACTER
  character An encoded string
Top

INTEGER GetPathSegments (character[])

/* Helper method to return the path as an array of segments.
Parameters:
pSegments CHARACTER
 
Returns INTEGER
  character[] An array of path segments.
Top

OpenEdge.Core.Collections.IStringStringMap GetQueryMap ()

Purpose: Gets the complete set of query names and values.
Returns OpenEdge.Core.Collections.IStringStringMap
  IStringStringMap A map of query names and values
Top

INTEGER GetQueryNames (character[])

Purpose: Returns an array of query names
Parameters:
pcNames CHARACTER
 
Returns INTEGER
  integer The number
Top

CHARACTER GetQueryValue (character)

Purpose: Get a char query value from the query
Parameters:
pcName CHARACTER
 
Returns CHARACTER
 
Top

LOGICAL HasQueryName (character)

Purpose: Returns an array of query names
Parameters:
pName CHARACTER
 
Returns LOGICAL
  logical TRUE if the URI has the given query string
Top

CHARACTER MergePath (character[5], character[5])

/* Merges a relative path into a base path, as per https://tools.ietf.org/html/rfc3986#section-5.2.3 .
Parameters:
pBaseURI CHARACTER
 
pRelURI CHARACTER
 
Returns CHARACTER
  character The merged path
Top

OpenEdge.Net.URI Parse (character)

Purpose: Parses a string containing a URI and creates a URI object from it
Parameters:
pcURI CHARACTER
 
Returns OpenEdge.Net.URI
  URI A URI representation of the string.
Top

OpenEdge.Net.URI Parse (character, logical)

Purpose: Parses a string containing a URI and creates a URI object from it
Parameters:
pcURI CHARACTER
 
pDecode LOGICAL
 
Returns OpenEdge.Net.URI
  URI A URI representation of the string.
Top

CHARACTER RemoveDotSegments (character)

/* Removes any dot segments in a path string, per the rules at https://tools.ietf.org/html/rfc3986#section-5.2.4
Parameters:
pInputBuffer CHARACTER
 
Returns CHARACTER
  character The path with the "." and/or ".." segments removed and resolved
Top

LOGICAL RemoveQuery (character)

/* Removes a query parameter
Parameters:
pcName CHARACTER
 
Returns LOGICAL
  logical TRUE if the named query existed (before removal)
Top

OpenEdge.Net.URI ResolveRelativeReference (URI, character)

/* Resolve a relative URI reference to a base URI, as per RFC3986, at https://tools.ietf.org/html/rfc3986#section-5.2.2 .
The relative URI reference does not have to be a complete URI - it may only have certain parts of a URI (like path only,
or query only).
Parameters:
pBaseUri OpenEdge.Net.URI
 
pRelativeRef CHARACTER
 
Returns OpenEdge.Net.URI
  URI A resolved URI
Top

SetAuthority (character, logical)

/* Adds a URI's authority components to this instance
Parameters:
pAuthority CHARACTER
 
pDecode LOGICAL
 
Top

SetPath (character)

/* Sets this URI's complete Path. This replaces the existing path.
Parameters:
pPath CHARACTER
 
Top

SetPath (character[])

/* Sets the Path property from an array of segments.
Will %-encode the segment values
Empty/blank segments are ignored
Dotted paths are added as-is
Parameters:
pcSegments CHARACTER
 
Top

SetQueryMap (IStringStringMap)

Purpose: Sets (merges) a set of query names and values into this URI
Parameters:
pQueryMap OpenEdge.Core.Collections.IStringStringMap
 
Top

CHARACTER Split ()

/* Parses this URI into its component parts.
[1] scheme (http/https)
[2] authority (host:port)
[3] path
[4] query
[5] fragment
Returns CHARACTER
  character[] An array of component parts
Top

CHARACTER SplitUri (character)

/* Parses an potentially-URI-containing string into URI component parts.
This method will not fail, and will return empty values for an element of the
URI if the string cannot be parsed or fails to parse somehow. So if the string contains
http//example.com
the auhority will be 'example.com' and the scheme empty (since there's no :).
[1] scheme (http/https)
[2] authority (host:port)
[3] path
[4] query
[5] fragment
Parameters:
pData CHARACTER
 
Returns CHARACTER
  character[] An array of component parts
Top

CHARACTER ToString ()

Purpose: Returns a string representation of this URI
Returns CHARACTER
  character The string URI


Constructor Detail
Top

STATIC URI ()

/* Static constructor. Used to build lists of to-encode character flags
Top

URI (character)

Purpose: Constructor. Defaults to HTTP scheme.
Parameters:
pcHost CHARACTER
 
Top

URI (character, character)

Purpose: Constructor.
Parameters:
pcScheme CHARACTER
 
pcHost CHARACTER
 
Top

URI (character, character, character, character, character)

Purpose: Constructor.
Parameters:
pScheme CHARACTER
 
pAuthority CHARACTER
 
pPath CHARACTER
 
pQuery CHARACTER
 
pFragment CHARACTER
 
Top

URI (character, character, integer)

Purpose: Constructor.
Parameters:
pcScheme CHARACTER
 
pcHost CHARACTER
 
piPort INTEGER
 
Top

URI (character, character, integer, character, IStringStringMap, character)

Purpose: Constructor.
Parameters:
pcScheme CHARACTER
 
pcHost CHARACTER
 
piPort INTEGER
 
pcPath CHARACTER
 
poQueryMap OpenEdge.Core.Collections.IStringStringMap
 
pcFragment CHARACTER
 


Property Detail
Top

INTEGER AUTHORITY_PART_IDX

Returns INTEGER
 
Top

CHARACTER BaseURI

Returns CHARACTER
 
Top

CHARACTER Fragment

Returns CHARACTER
 
Top

INTEGER FRAGMENT_PART_IDX

Returns INTEGER
 
Top

CHARACTER Host

Returns CHARACTER
 
Top

CHARACTER Password

Returns CHARACTER
 
Top

CHARACTER Path

Returns CHARACTER
 
Top

INTEGER PATH_PART_IDX

Returns INTEGER
 
Top

INTEGER Port

Returns INTEGER
 
Top

OpenEdge.Core.Collections.IStringStringMap QueryMap

Returns OpenEdge.Core.Collections.IStringStringMap
 
Top

CHARACTER QueryString

Returns CHARACTER
 
Top

INTEGER QUERY_PART_IDX

Returns INTEGER
 
Top

CHARACTER RelativeURI

Returns CHARACTER
 
Top

CHARACTER Scheme

Returns CHARACTER
 
Top

INTEGER SCHEME_PART_IDX

Returns INTEGER
 
Top

CHARACTER User

Returns CHARACTER