Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 1abfe597bc89458ccaa645cd148862bb > files > 80

ocaml-ocamlnet-doc-3.7.3-3.mga4.noarch.rpm

#require "netclient";;

(* This example shows how to get a file from a HTTP server using
 * the Convenience module.
 *
 * Load this into the toplevel, then:
 * get_and_print "http://www.caml.org/";;
 *)

open Http_client.Convenience;;

let get_and_print url =
  let s = http_get url in
  print_string s;
  flush stdout
;;