Kernel Toolkit 7.3 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$PARSEURL^XTHCURL(): Parses a URL String

Reference Type: Supported, Category: Toolkit—HTTP Client Helper, ICR#: 5554

Description

The $$PARSEURL^XTHCURL extrinsic function parses a URL string into host, port, and path (path includes query string).

NOTE: XTHC* routines are part of the HTTP Client Helper application for developers.

NOTE: This API was released with Kernel Toolkit Patch XT*7.3*123.

NOTE: This API is IPv6 compliant as of Kernel Toolkit patch XT*7.3*138.

Format

  $$PARSEURL^XTHCURL(url,.host,.port,.path)

Input Parameters

url:

(required) URL string to be parsed.

Output Parameters

host: (required) Reference to variable where host name is to be returned.
port: (required) Reference to variable where port is to be returned.
path: (required) Reference to variable where path string is to be returned.

Output

returns:

Returns:

  • Success: 0

  • Fail: -1^Error Description

Example:

D PARSEURL^XTHCURL("http://cgi.vagroup.va.gov:9999/tpl/PKG",.ZH,.ZP,.ZA)
W ZH,!,ZP,!,ZA

vagroup.va.gov
9999
/tpl/PKG