Search code examples
c++httpcompostwinhttp

WinHTTP IWinHttpRequest iface - cookie handling - how to get cookies from response?


I'm using WinHTTP IWinHttpRequest object. I do POST to a https domain specyfying a request body with credentials. The site is expected to return cookies in HTTP response. The code works in Wininet - but I don't know how in WinHTTP to get cookies from the HTTP response?

Can anybody help?

Dominik


Solution

  • I would start with the Cookie Handling in WinHTTP article on MSDN.

    If you want to do things manually, here's an (ugly) VB code sample you can crib from: http://www.devnewsgroups.net/group/microsoft.public.exchange.development/topic58495.aspx)