Hello Wolfgang,

"Wolfgang Meyer" <[email protected]>:
> you can use the Open module, but it is actually quite high-level:
> 
> declare
> F = {New Open.file init(url:'http://www.google.com/')}
> in
> {System.showInfo {F read(list:$ size:all)}}
> {F close}

seems I didn't read the documentation very good - didn't notice that
(but took much more time to unsuccessful search in URL and Resolve,
just noticed the Open module after that). That seems to be exactly what
I want - thank you!

> However, this does not seem to work on Windows. If you need this
> functionality on Windows, you can fall back to using a socket:

For me, it's a Linux box, luckily...

Cheers,
Eckard

> declare
> Client = {New Open.socket client(host:"google.com" port:80)}
> in
> {Client write(vs:"GET / HTTP/1.0\r\n")}
> {Client write(vs:"\r\n")}
> {System.showInfo {Client read(list:$ size:all)}}
> {Client close}
> 
> Cheers,
>   Wolfgang
> 
> 
> Eckard Brauer <[email protected]> wrote:
> > Hello,
> > 
> > for building a very limited HTTP client (fetching a number of URLs,
> > search for strings or comparing with a pattern, writing out the
> > results), is there some higher level protocol module or will I have
> > to use the more low level primitives from the Open module?
> > 
> > Cheers
> > Eckard
> 


-- 
Buffer overflow in BundTroj.exe: Can't send KeyLog. Exiting.

Attachment: signature.asc
Description: PGP signature

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to