D
D
danij_com2019-01-19 11:31:41
C++ / C#
danij_com, 2019-01-19 11:31:41

How to transfer cookies from WinInet to WinSock?

Hello.
There is a simple WinInet code that makes a request to the site, receiving cookies from it. If you make a subsequent request to this site through WinInet, then it makes it with the cookies already issued.
There is a need to somehow make it so that I can make the second request through sockets (and it was with cookies that Vinynet received).
How to do it better, where to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SerJook, 2019-01-21
@SerJook

First you send a request using WinInet, then you call the InternetGetCookie function with the URL you need and get the cookie. But note that it may not return all cookies:
The cookies obtained in this way are sent via sockets (Adding the "Cookie" HTTP header to the request headers)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question