Class Reference
IRIS for UNIX 2024.1.2
|
|
Private
Storage
|
Network Utility %Net.HttpRequest, %Net.SMTP, %Net.FTP
|
|
|
The method checks for the existence of the configured SSL configuration and creates an empty configuration with that name if this yet to connect to a https server, that's enough
To receive from the data server at the URL If TempDir is specified, then the file will be written there w ##class(apptools.core.net).GetHttp("https://codeload.github.com/SergeyMi37/cache-iris-app-tools/zip/master",.out2,"D:\temp\")
Get IP address w ##class(apptools.core.net).GetIP("google.com") w $P($ZU(54,13,$zu(54,0)),",",1)
Get IP address external do ##class(apptools.core.net).GetIPext(,.ip) zw ip
write $System.Status.GetErrorText(##class(apptools.core.net).GetJsonURL("https://pm.community.intersystems.com/",.o))
To obtain the server's IP address w ##class(apptools.core.net).GetIP() $G(%request.CgiEnvs("REMOTE_ADDR")) - agrees client
d ##class(apptools.core.net).GetMailPOP3()
if ##class(apptools.core.net).GetResult("http://localhost/apptoolsrest/productslist/-","user","pass",.json) do json.%ToJSON()
Get current URI write ##class(apptools.core.net).GetURI(.prop)
Import CSP-file from GitHub repository for 7z utility s repo="cache-iris-app-tools" d ##class(apptools.core.net).ImportCSPFromGitHub("https://codeload.github.com/SergeyMi37/"_repo_"/zip/master",repo,"d:\!\csptest")
install ZPM with proxy. You can call this, or copy the line modified Sergey Mikhaylenko
Download the file and put on the server by adding the name of the mark date and time
To response to Http Post request
d ##class(apptools.core.net).RunPage()
Zip files and Send to email w ##class(apptools.core.net).SendFilesToEmail()
To send email subscrible - a comma separated list whom to send the letter subj - subject text - the text of the letter attach - an array of files the link samples write ##class(apptools.core.net).SendMail(server, port, ssl, UseSTARTTLS, timezone, username, psw, from, subscrible, subj, text, attach)
do ##class(apptools.core.net).SetProxy(.r)
Code from Robert Cemper https://github.com/rcemper/Zpipe write ##class(apptools.core.net).cpipe("ping -c 3 openexchange.intersystems.com")
/* Install ZPM, ZAPM */ set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name) set url="https://pm.community.intersystems.com/packages/zpm/latest/installer" Do ##class(%Net.URLParser).Parse(url,.comp) set ht = ##class(%Net.HttpRequest).%New(), ht.Server = comp("host"), ht.Port = 443, ht.Https=1, ht.SSLConfiguration=name, st=ht.Get(comp("path")) quit:'st $System.Status.GetErrorText(st) set xml=##class(%File).TempFilename("xml"), tFile = ##class(%Stream.FileBinary).%New(), tFile.Filename = xml do tFile.CopyFromAndSave(ht.HttpResponse.Data) do ht.%Close(), $system.OBJ.Load(xml,"ck") do ##class(%File).Delete(xml) zpm "install zapm" w ##class(apptools.core.net).loadzpm()