From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,NO_REAL_NAME,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 60462BC69 for ; Tue, 14 Aug 2007 19:30:04 +0200 (CEST) Received: from smtphost.cis.strath.ac.uk (smtphost.cis.strath.ac.uk [130.159.196.96]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7EHU3vJ026291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 Aug 2007 19:30:04 +0200 Received: from webmail.cis.strath.ac.uk (www@smtphost.cis.strath.ac.uk [130.159.196.96]) by smtphost.cis.strath.ac.uk (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l7EHTxbD028230 for ; Tue, 14 Aug 2007 18:29:59 +0100 Received: from host-84-13-116-50.opaltelecom.net.116.13.84.in-addr.arpa ([84.13.116.50]) (SquirrelMail authenticated user pg) by webmail.cis.strath.ac.uk with HTTP; Tue, 14 Aug 2007 18:29:59 +0100 (BST) Message-ID: <1628.84.13.116.50.1187112599.squirrel@webmail.cis.strath.ac.uk> Date: Tue, 14 Aug 2007 18:29:59 +0100 (BST) Subject: Basic Ocamlnet Question From: Peter.Gregory@cis.strath.ac.uk To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal References: In-Reply-To: X-CIS-MailScanner: Found to be clean X-CIS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.55, required 6, autolearn=disabled, NO_REAL_NAME 0.55) X-CIS-MailScanner-From: pg@cis.strath.ac.uk X-j-chkmail-Score: MSGID : 46C1E69B.001 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 46C1E69B.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamlnet:01 ocamlnet:01 tweaking:01 stdout:01 token:01 token:01 wrote:01 api:02 string:02 interfaced:02 flush:03 let:03 let:03 problem:05 examples:07 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 [(""," mytoken ")] 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.