The OpenEdge.Net.URI class encapsulates the target address, including the scheme (enumerated in OpenEdge.Net.UriSchemeEnum), host, port, path, query, and other related URI elements.

Examples

Typically, a new URI object is created using a constructor, and passing in at least the scheme and host. The other elements of the URI can be added using properties or methods (queries).

Constructing a URI object

USING OpenEdge.Net.URI.
USING OpenEdge.Net.UriSchemeEnum. 

DEFINE VARIABLE oURI AS URI NO-UNDO. 

oURI = new URI(string(UriSchemeEnum:http), 'oemobiledemo.progress.com').
oURI:Path = '/VehicleOrderService/rest/VehicleOrder/Cart'. 
oURI:AddQuery('filter', '').

A URI can also be derived from a string using the static Parse() method. Use the Encode() method to return an encoded version of the URI.

Deriving a URI from a string

USING OpenEdge.Net.URI.
 
DEFINE VARIABLE oURI AS URI NO-UNDO.

oURI = OpenEdge.Net.URI:Parse('http://www.progress.com').