当前位置:网站首页>Other InterSystems%net tools

Other InterSystems%net tools

2022-07-04 19:00:00 User 7741497

Here is %Net A short list of some other useful classes in :

%Net.URLParser

InterSystems IRIS Provides a utility class %Net.URLParser, You can use it to URL The string is parsed into its components . for example , When you redirect HTTP When asked , It's very useful .

This class contains a class method Parse(), It accepts a containing URL String of values , And return a containing by reference URL An array of parts . for example :

/// w ##class(PHA.TEST.HTTP).URLParser()
ClassMethod URLParser()
{
    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)
    zw components
}
DHC-APP>w ##class(PHA.TEST.HTTP).URLParser()
components("fragment")=""
components("host")="www.google.com"
components("netloc")="www.google.com"
components("params")=""
components("path")="/search"
components("query")="q=Java+site%3Adocs.intersystems.com&oq=Java+site%3Adocs.intersystems.com"
components("scheme")="https"

return , The component will contain this URL An array of parts :

Element

Value

Description

components("fragment")

null

URL Fragments of (# After the character )

components("host")

www.google.com

URL Requested host

components("netloc")

www.google.com

URL Network address of

components("params")

URL It contains URL Parameters

components("path")

/search

URL File path

components("query")

q=Java+site%3Adocs.intersystems.com&oq=Java+site%3Adocs.intersystems.com

URL The query string contained in

components("scheme")

https

this URL Specified transmission scheme

%Net.Charset

have access to %Net.Charset Express InterSystems IRIS Internal MIME Character set , And map these character sets to InterSystems IRIS Zone setup . This class includes the following class methods :

  • GetDefaultCharset() Returns the current InterSystems IRIS Default character set for locale .
  • GetTranslateTable() Returns the... Of the given input character set InterSystems IRIS Name of conversion table .
  • TranslateTableExists() Indicates whether the conversion table for the given character set has been loaded .

%Net.TelnetStream

have access to %Net.TelnetStream simulation Windows NT Telnet.exe Handshake behavior of .

%Net Security Classes

%Net Packages provide many classes for authentication and security .

原网站

版权声明
本文为[User 7741497]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041708542066.html