Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [apptools] >  [core] >  [net]
Private  Storage   

abstract class apptools.core.net

Network Utility %Net.HttpRequest, %Net.SMTP, %Net.FTP

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
20


Summary

Methods
CheckSSLCertificate GetHttp GetIP GetIPext
GetJsonURL GetListIP GetMailPOP3 GetResult
GetURI ImportCSPFromGitHub InstallZPMproxy KILLMAIL
LoadFileHttp PostHttp RunPage SendFilesToEmail
SendMail SetProxy cpipe loadzpm


Methods

• classmethod CheckSSLCertificate(name) as %String
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
• classmethod GetHttp(aURL="", aDATA, TempDir="", tmpGN="", user="", pass="", ByRef HttpRequest="") as %Status
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\")
• classmethod GetIP(host="") as %String
Get IP address w ##class(apptools.core.net).GetIP("google.com") w $P($ZU(54,13,$zu(54,0)),",",1)
• classmethod GetIPext(url={"https://pr-cy.ru/browser-details/"}, ByRef ip) as %Status
Get IP address external do ##class(apptools.core.net).GetIPext(,.ip) zw ip
• classmethod GetJsonURL(url As %String, ByRef object) as %Status
write $System.Status.GetErrorText(##class(apptools.core.net).GetJsonURL("https://pm.community.intersystems.com/",.o))
• classmethod GetListIP() as %String
To obtain the server's IP address w ##class(apptools.core.net).GetIP() $G(%request.CgiEnvs("REMOTE_ADDR")) - agrees client
• classmethod GetMailPOP3(MDEAM, BSmName, BSmPass, MASS, dir) as %String
d ##class(apptools.core.net).GetMailPOP3()
• classmethod GetResult(url As %String, user="", pass="", ByRef result As %ZEN.proxyObject)
if ##class(apptools.core.net).GetResult("http://localhost/apptoolsrest/productslist/-","user","pass",.json) do json.%ToJSON()
• classmethod GetURI(Properties, suff="") as %String
Get current URI write ##class(apptools.core.net).GetURI(.prop)
• classmethod ImportCSPFromGitHub(url, repo, target)
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")
• classmethod InstallZPMproxy()
install ZPM with proxy. You can call this, or copy the line modified Sergey Mikhaylenko
• classmethod KILLMAIL(MDEAM, BSmName, BSmPass, MSGK, Kill) as %String
• classmethod LoadFileHttp(aURL="", aDATA, TempDir="", fileName) as %Status
Download the file and put on the server by adding the name of the mark date and time
• classmethod PostHttp(ServerPort, method, user, pass, ByRef body, ByRef out) as %String
To response to Http Post request
• classmethod RunPage(Url As %String = "http://intersystems.ru")
d ##class(apptools.core.net).RunPage()
• classmethod SendFilesToEmail(subj, text, files, zip=1, email="") as %Status
Zip files and Send to email w ##class(apptools.core.net).SendFilesToEmail()
• classmethod SendMail(server, port, ssl, UseSTARTTLS, timezone, username, psw, from, subscrible, subj, text, attach) as %Status
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)
• classmethod SetProxy(tRequest) as %Status
do ##class(apptools.core.net).SetProxy(.r)
• classmethod cpipe(command="", test=0) as %Status
Code from Robert Cemper https://github.com/rcemper/Zpipe write ##class(apptools.core.net).cpipe("ping -c 3 openexchange.intersystems.com")
• classmethod loadzpm() as %Status
/* 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()


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.