Version française
Home     About     Download     Resources     Contact us    
Browse thread
Get a page from the Web
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Weimer <fw@d...>
Subject: Re: [Caml-list] Get a page from the Web
* Martin Chabr:

> import urllib
> URL = "http://www.ibm.com"
> url = urllib.urlopen(URL)
> html = url.read()

You could use the Netclient library:

let s = Http_client.Convenience.http_get "http://www.ibm.com" in
  output_string stdout s

(Compile with: ocamlfind ocamlc -package netclient -linkpkg file.ml)