#!/usr/bin/X11/mofe --f w3LoadAnchor [w3GetAnchor http://mohegan.wi-inf.uni-essen.de/] \ [w3RequestNew wwwPresent {Presenter {xedit %s}}] |
w3GetAnchor
creates an empty anchor structure, binds it to a URL
and returns a handle for the anchor.
w3RequestNew
creates a new request object, configures the
destination for incoming data with the wwwPresent
attribute and
returns a handle for the request.
#!/usr/bin/X11/mofe --f w3AddConverter image/gif \ {FileWriter {puts "%r: [w3RequestGet %r bytesRead] Bytes to %d"}} w3LoadAnchor [w3GetAnchor http://wwwi.wu-wien.ac.at/buchcover.gif] \ [w3RequestNew postCb {puts Done}] |
w3AddConverter
an incremental presenter
is registered for a specific content-type.
FileWriter
)
appends data to a temporary
file and invokes a handler procedure every time new data arrives.
w3RequestNew
and a
termination handler postCb
is registered.
w3LoadAnchor
using the two handles.
The following example demonstrates, how to access SHTTP in Wafe.
#!/usr/bin/X11/mofe --f set W3SSL $env(HOME)/.cineast/ssl set req [w3RequestNew \ wwwPresent {Presenter {xedit %s}} \ sslPrivateKey $W3SSL/priv/seen.pem \ sslCertFile $W3SSL/priv/seen.pem \ sslVerifyDir $W3SSL/certs/ \ sslVerify peer] w3LoadAnchor [w3GetAnchor https://www.eunet.co.at/] $req |
sslPrivateKey
and sslCertFile
specify
the user's credentials for the SSL handshake.
sslVerifyDir
specifies the place where
certificates of trusted certificate authorities can be found.
prev | index | next |