Created
September 19, 2009 23:47
Revisions
-
joewilliams created this gist
Sep 19, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ (* to compile: $ ocamlfind ocamlopt -o print_http_json print_http_json.ml -linkpkg -package json-static,netclient -syntax camlp4o to run (trying it out on couchdb): $ ./print_http_json http://localhost:5984/joetest *) open Printf let get url = (Json_io.json_of_string (Http_client.Convenience.http_get url )) let print json = printf "%s\n%!" (Json_io.string_of_json ~compact:false json) let _ = print (get(Sys.argv.(1)))