Skip to content

Instantly share code, notes, and snippets.

@iratqq
Created November 2, 2008 01:00
Show Gist options
  • Save iratqq/21607 to your computer and use it in GitHub Desktop.
Save iratqq/21607 to your computer and use it in GitHub Desktop.
wassr_get.ml
(* ocamlfind ocamlc -linkpkg -package netclient -w -s xml-light.cma -o wassr_get wassr_get.ml *)
open Xml;;
open Http_client.Convenience;;
let get_and_print url =
let s = http_get url in
let x = Xml.parse_string s in
print_string (Xml.to_string_fmt x);
flush stdout
;;
get_and_print "http://api.wassr.jp/statuses/user_timeline.xml?id=iratqq";;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment