From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id oBMNnOj6032337 for ; Thu, 23 Dec 2010 00:49:25 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AggCALMdEk3U436rkGdsb2JhbACDY5F4MY4ZFQEBAQEJCQwHEQMhsmOQagKBHoM1dASHIoZ/ X-IronPort-AV: E=Sophos;i="4.60,215,1291590000"; d="scan'208";a="93077857" Received: from moutng.kundenserver.de ([212.227.126.171]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Dec 2010 00:49:18 +0100 Received: from office1.lan.sumadev.de (dslb-188-097-015-021.pools.arcor-ip.net [188.97.15.21]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LjfP2-1Q6o3U2FDs-00bZ5m; Thu, 23 Dec 2010 00:49:12 +0100 Received: from [192.168.5.106] (dslb-188-097-015-021.pools.arcor-ip.net [188.97.15.21]) by office1.lan.sumadev.de (Postfix) with ESMTPA id 435355F701; Thu, 23 Dec 2010 00:49:12 +0100 (CET) From: Gerd Stolpmann To: oliver@first.in-berlin.de Cc: caml-list@inria.fr In-Reply-To: <20101222193907.GA8091@siouxsie> References: <20101222193907.GA8091@siouxsie> Content-Type: text/plain; charset="UTF-8" Date: Thu, 23 Dec 2010 00:49:13 +0100 Message-ID: <1293061753.22147.517.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:bVG/+pYiIt6n3BB6Rt64vFmtgC9HTS8ZhYS73QG0z44 sEuZUN5CKh93N0RoqYa0J/3dwcar0BoL8b4oIMFEiz9Cjjg1jL Un5llRDqmSJSFH8aZxKsicoLwwJDsUw6QzQ0Vmzt9aKZTWPQeX 8ZK9eZRf6OMeq6ox5CIW0bIbsExtg+QoPb1bZ/at8jszoeWGrp LsuXm8Mli2UFX4EDcbSqQ== Subject: Re: [Caml-list] Ocamlnet and sending Referrer Am Mittwoch, den 22.12.2010, 20:39 +0100 schrieb oliver@first.in-berlin.de: > Hi, > > > for a simple script I used > Http_client.Convenience from ocamlnet. > > This module is really convenient and I enjoyed to have it > for some simple get-calls. I'm quite happy with this. > > But now I need to send a Referrer, and this seems not to work > with this module. > > What module must be used for sending a Referrer? > And... just in case I may later will need Cookies also... > ...what module can handle this? > > Can this all be done with ocamlnet-stuff? > If there are more than one possibility, which module > would you recommend me (and why)? The convenience module does not permit it to set additional headers. Use the pipeline API: open Http_client let call = new get "http://host/path" ;; (call # request_header `Base) # update_field "Referer" (* sic! *) "..."; let p = new pipeline ;; p # add call ;; p # run();; if call # status = `Successful then let response = call # response_body # value in ... else (* error case *) ... Gerd > > Ciao, > Oliver > ----- > Caml-list mailing list. > Subscription management: https://sympa-roc.inria.fr/wws/info/caml-list > Archives: https://sympa-roc.inria.fr/wws/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > > -- ------------------------------------------------------------ Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------