CURL to get/set cookies

Benjamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 16 06:48:46 PDT 2015


Vladimir & Adam Thank you!  This was my last roadblock I needed 
to overcome to finish my prototype project for the company I work 
for.  After a successful presentation and demo - the company I 
work for is taking a serious look into the D language for future 
projects.

Thanks!  Ben.


On Monday, 6 April 2015 at 04:36:36 UTC, Vladimir Panteleev wrote:
> On Sunday, 5 April 2015 at 23:55:15 UTC, Benjamin wrote:
>> I"m still not able to set the cookie. Would it be possible to 
>> provide a few sample lines - to ensure I'm on the right path.  
>> I appreciate any additional help!!
>>
>> Thanks!  Benjamin
>
> This should work:
>
> auto cookiesFile = "cookies.txt";
>
> auto http = HTTP();
> http.handle.set(CurlOption.cookiefile, cookiesFile);
> http.handle.set(CurlOption.cookiejar , cookiesFile);
>
> get("www.example.com/login.php?username=benjamin&password=hunter2", 
> http);
> get("www.example.com/action.php?...", http);



More information about the Digitalmars-d-learn mailing list