English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
cookies in netclient
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-28 (12:48)
From: Hendrik Tews <tews@c...>
Subject: Re: [Caml-list] cookies in netclient
Gerd Stolpmann <info@gerd-stolpmann.de> 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?

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?

   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.

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.