On Friday 16 September 2005 12:33, Aly Roz wrote:
> Actually I am want to access a particular forum through curlpp.
> Through browser, I first login using my username/password, then that forum
> identifies my subsequent http requests using cookie mechanism.
>
> I want to access that forum using curlpp. With curlpp, I could first login
> using username/password. Then I want to include the cookie
> in the subsequent requests. I want to know how to set the cookie
> information in the request headers using curlpp.
>
from libcURL doc:
CURLOPT_COOKIE
Pass a pointer to a zero terminated string as parameter. It will be used to
set a cookie in the http request. The format of the string should be
NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
should contain.
If you need to set multiple cookies, you need to set them all using a single
option and thus you need to concatenate them all in one single string. Set
multiple cookies in one string like this: "name1=content1; name2=content2;"
etc.
Using this option multiple times will only make the latest string override the
previously ones.
So, you just need to use the Options::Cookie option.
> Thanks again,
> Aly
>
> On 9/16/05, Jean-Philippe Barrette-LaPierre <jpb_at_rrette.com> wrote:
> > On Friday 16 September 2005 11:49, Aly Roz wrote:
> > > Hi,
> > >
> > > How do I store http session state using curlpp.
> >
> > What do you mean by storing http session state?
> >
> > > Do I need to set the cookie in the http request header. If yes, please
> > > let me know how to set cookies in the request headers.
> > >
> > > Thanks,
> > > Aly
> >
> > --
> > Jean-Philippe Barrette-LaPierre
> > cURLpp maintener (http://rrette.com/curlpp.html)
--
Jean-Philippe Barrette-LaPierre
cURLpp maintener (http://rrette.com/curlpp.html)
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2005-09-16