Command group Flag affected Reversible Execute on client Platform(s)
External commands YES NO NO All


HTTPSplitURL (url,hostname,uriReturns status


Note: The flag is set according to whether Omnis was able to make a call to this external command.

This Web command is multi-threaded, allowing another thread to execute in the multi-threaded server while it runs. Note that the same socket cannot safely be used concurrently by more than one thread.

HTTPSplitURL is a server and client function which splits a full URL into a hostname and a path (that is, a URI). Useful for following HREF links on pages.

URL is an Omnis Character field containing a standard Web page URL of the form If you are using a secure connection, the URL must be prefixed with https://.

Hostname is an Omnis character field that receives the hostname parsed out of the URL argument. For example, given the URL, above, the hostname portion would be

URI is an Omnis Character field that receives URI parsed out of the URL. For example, given the URL, above, the URI would be /path/webpage.html.

The command returns an integer status, which is less than zero if an error occurs. Possible error codes are listed in the Web Command Error Codes Appendix.


; Split lUrl into lHostname and lUri
Calculate lUrl as ''
HTTPSplitURL (lUrl,lHostName,lUri) Returns lStatus
;; lHostName =, lUri = /news/index.html