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=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 4F746BC6B for ; Tue, 28 Aug 2007 16:12:47 +0200 (CEST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7SECkAi008712 for ; Tue, 28 Aug 2007 16:12:47 +0200 Received: from dslb-084-059-126-222.pools.arcor-ip.net [84.59.126.222] (helo=gate.lan.gerd-stolpmann.de) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1IQ1oC1c2b-0006ay; Tue, 28 Aug 2007 16:12:44 +0200 Received: from flakew.lan.gerd-stolpmann.de (fw.lan.gerd-stolpmann.de [192.168.1.1]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id 02087C054; Tue, 28 Aug 2007 16:12:40 +0200 (CEST) Subject: Re: [Caml-list] cookies in netclient From: Gerd Stolpmann To: Hendrik Tews Cc: caml-list@yquem.inria.fr In-Reply-To: References: <18127.20625.317597.197268@tandem.cs.ru.nl> <1188253645.7533.15.camel@localhost.localdomain> Content-Type: text/plain Date: Tue, 28 Aug 2007 16:12:40 +0200 Message-Id: <1188310360.7533.51.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19ZfNd/EoyQxW+VJUdg+lwXLoEe+w2xYvEWjGB k8+jU0E5FBTBPd/BUc+0S9wOJwli2NAJrcfaxOo8Ke7NTNlfPK nXlHwhMtKSS9RWKr33QCfNE90CyFcMc X-Miltered: at discorde with ID 46D42D5E.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; netclient:01 gerd:01 stolpmann:01 hendrik:01 tews:01 gerd:01 stolpmann:01 ocamlnet:01 hendrik:01 beginner's:01 ocaml:01 bug:01 viktoriastr:01 64293:01 darmstadt:01 Am Dienstag, den 28.08.2007, 14:48 +0200 schrieb Hendrik Tews: > Gerd Stolpmann writes: > > No, not automatically, i.e. it doesn't mimick the behaviour of a > browser. You can get cookies by looking in the header, and also set them > in the header. There are helper functions for this in Nethttp.Header. > > Well but then I can't use the Convenience module, can I? No, you can't. It is made for simple cases. > I briefly looked at Convenience.http_get. I have the impression > that in order to store cookies in the header I should modify the > header after the creation of the http_call object with > new get (...). But how do I access to the get http_header object > that I suppose is somewhere inside http_call? request_header method. > Unfortunately, get_set_cookie is missing (I have an implementation if > you really need it). > > This one would retrieve the cookies as an Nethttp.cookie list? I > don't know yet if I need it. yes. You find it if you need it: https://godirepo.camlcity.org/wwwsvn/trunk/code/get-set-cookie.ml?rev=1145&root=lib-ocamlnet2&view=auto Gerd > > > I would like to use ocamlnet instead of > "curl -b cookies.txt -c cookies.txt ..." to retrieve pages and > submit data with the post method. Any hints are appreciated. > > Bye, > > Hendrik > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------