25.01.2015 Views

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FTP<br />

24.2 FTP<br />

<strong>Caché</strong> includes a class, %Net.FtpSession, for establishing a session with an FTP (File Transfer<br />

Protocol) server from within <strong>Caché</strong> and download and uploading files.<br />

24.3 HTTP<br />

<strong>Caché</strong> includes a class, %Net.HttpRequest, for making HTTP (Hyper Text Transport Protocol)<br />

requests from within a <strong>Caché</strong> application. The response to such a request is wrapped within<br />

a %Net.HttpResponse object.<br />

24.4 URL Parsing<br />

<strong>Caché</strong> includes a utility class, %Net.URLParser, for parsing URL strings into their component<br />

parts.<br />

This class is quite simple, it contains one class method, Parse, that takes a string containing<br />

a URL value and returns, by reference, an array containing the parts of the URL subscripted<br />

by part name. For example:<br />

Set url = "http://www.intersys.com/main.cspQUERY=abc#anchor"<br />

Do ##class(%Net.URLParser).Parse(url,.components)<br />

Upon return, components will contain an array of the parts of this URL:<br />

Element<br />

components(“scheme”)<br />

components(“netloc”)<br />

components(“path”)<br />

components(“query”)<br />

components(“fragment”)<br />

Value<br />

http:<br />

www.intersys.com<br />

/main.csp<br />

QUERY=abc<br />

anchor<br />

Description<br />

The transport scheme specified by<br />

this URL.<br />

The network address of the URL.<br />

The file path of the URL.<br />

The query string associated with<br />

the URL.<br />

The fragment (following the #<br />

character) for the URL.<br />

<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 199

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!