caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Basic Ocamlnet Question
@ 2007-08-14 17:29 Peter.Gregory
  2007-08-14 17:39 ` [Caml-list] " Oliver Bandel
  2007-08-14 17:46 ` Gerd Stolpmann
  0 siblings, 2 replies; 4+ messages in thread
From: Peter.Gregory @ 2007-08-14 17:29 UTC (permalink / raw)
  To: caml-list

Hi,

I've just started messing about with ocamlnet, and have instantly run 
into a problem.  I was trying to write some code that interfaced with  the
backpack API (http://developer.37signals.com/backpack/).  I tried 
tweaking one of the examples just to get a page listing, and wrote the 
following:


open Http_client.Convenience;;

let get_and_print url  =
   let s = http_post url [("","<request> <token>mytoken</token>
</request>")] in
   print_string s;
   flush stdout
;;

let () = get_and_print "http://pg.backpackit.com/ws/pages/all";;


However, this doesn't work, as the header for the request should be 
"Content-Type: application/xml".  How do I set the header for my request 
in ocamlnet?

Thanks,
Peter.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-14 19:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-14 17:29 Basic Ocamlnet Question Peter.Gregory
2007-08-14 17:39 ` [Caml-list] " Oliver Bandel
2007-08-14 17:46 ` Gerd Stolpmann
2007-08-14 19:37   ` Peter.Gregory

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).