首页 > 数据库 > > 其他InterSystems %Net工具
下面是%Net中其他一些有用类的简短列表:
InterSystems IRIS提供了一个实用程序类%Net.URLParser,可以使用它将URL字符串解析为其组成部分。例如,当您重定向HTTP请求时,这很有用。
该类包含一个类方法Parse(),它接受一个包含URL值的字符串,并通过引用返回一个包含URL各部分的数组。例如:
/// w ##class(PHA.TEST.HTTP).URLParser()
ClassMethod URLParser()
{
Set url = "https:///search?q=Java+site%3Adocs.intersystems.com&oq=Java+site%3Adocs.intersystems.com"
Do ##class(%Net.URLParser).Parse(url,.components)
zw components
}
DHC-APP>w ##class(PHA.TEST.HTTP).URLParser()
components("fragment")=""
components("host")=""
components("netloc")=""
components("params")=""
components("path")="/search"
components("query")="q=Java+site%3Adocs.intersystems.com&oq=Java+site%3Adocs.intersystems.com"
components("scheme")="https"返回时,组件将包含此URL各部分的数组:
| Element | Value | Description |
|---|
可以使用%Net.Charset表示InterSystems IRIS内的MIME字符集,并将这些字符集映射到InterSystems IRIS区域设置。此类包括以下类方法:
GetDefaultCharset()返回当前InterSystems IRIS区域设置的默认字符集。GetTranslateTable()返回给定输入字符集的InterSystems IRIS转换表的名称。TranslateTableExists()指示是否已加载给定字符集的转换表。可以使用%Net.TelnetStream模拟Windows NT Telnet.exe的握手行为。
%Net包提供了许多用于身份验证和安全性的类。
来源 https://zhuanlan.zhihu.com/p/377475698
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69999831/viewspace-3126143/ ,如需转载,请注明出处,否则将追究法律责任。