The AdvancedWebServer component is used to send HTTP requests to HTTP servers and capture the responses. It supports the following HTTP methods: GET, POST, PUT, HEAD and DELETE.
This component supports: persistent connections, HTTPS, proxies (SOCKS4 and SOCKS5), cookies, HTTP headers and HTTP authentication. Use the CookieManager component if you need to send HTTP "cookies" with your requests.
This component returns HTTP responses as instances of HttpResponse.
do
ws = AdvancedWebServer()
connectTo(ws, protocol : "http", host : "oracle.com", port : 80)
response = getFrom(ws, file : "/")
BinaryFile.writeFromBinaryTo(data : response.data,
name : "/tmp/oracle.html",
append : false)
on exit
disconnectFrom ws
end