Skip to main content
Previous section

Other InterSystems %Net Tools

Here is a brief list of some other useful classes in %Net:

InterSystems IRIS provides a utility class, %Net.URLParser, that you can use to parse URL strings into their component parts. This is useful, for example, when you are redirecting an HTTP request.

This class contains one class method, Parse(), that takes a string containing a URL value and returns, by reference, an array that contains the parts of the URL. For example:

Set url = "https://www.google.com/search?q=Java+site%3Adocs.intersystems.com&oq=Java+site%3Adocs.intersystems.com"
Do ##class(%Net.URLParser).Parse(url,.components)
Copy code to clipboard

Upon return, components will contain an array of the parts of this URL:

Element Value Description
components("fragment") null The fragment (following the # character) for the URL
components("host") www.google.com The host requested by the URL
components("netloc") www.google.com The network address of the URL
components("params")   The URL parameters contained in the URL
components("path") /search The file path of the URL
components("query" q=Java+site%3Adocs.intersystems.com&oq=Java+site%3Adocs.intersystems.com The query string contained in the URL
components("scheme") https The transport scheme specified by this URL

For more information, refer to the class documentation for %Net.URLParser.

You can use %Net.Charset to represent MIME character sets within InterSystems IRIS and map these character sets to InterSystems IRIS locales. This class includes the following class methods:

  • GetDefaultCharset() returns the default character set for the current InterSystems IRIS locale,

  • GetTranslateTable() returns the name of the InterSystems IRIS translation table for a given input character set.

  • TranslateTableExists() indicates whether the translation table for the given character set has been loaded.

For method signatures, see the class documentation for %Net.Charset.

For more information on character sets and translation tables, see “System Classes for National Language Support” in Specialized System Tools and Utilities.

You can use %Net.TelnetStream to emulate the handshaking behavior of Windows NT Telnet.exe. For details, see the class documentation for %Net.TelnetStream.

%Net Security Classes

The %Net package provides many classes for authentication and security. For information, see the extensive class documentation.