Try OpenEdge Now
skip to main content
Programming Interfaces
Input/Output Processes : Making HTTP(S) requests from ABL applications : Basic request-response functionality : OpenEdge.Net.URI
 
OpenEdge.Net.URI
The URI class encapsulates the target address, including the scheme (enumerated in OpenEdge.Net.UriSchemeEnum), host, port, path, query, and other related URI elements. For a description of the pieces that comprise a URI go to: http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/ .

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').