Joe
2005-09-28 00:45:43 UTC
First apologies for cross posting but the Wininet groups are pretty dead.
Would someone tell me how cookies are handled in wininet - I can't work out
whether I need to add the cookies to any GET or POST I send or whether they
are added automatically.
I log in to a site with HttpOpenRequest then HttpSendRequest.
The login seems to work fine and I receive some cookies back in the header.
I then execute an InternetGetCookie "for fun" and I get the "logged in"
session ID cookies and some persistent cookies back.
What do I do with them? I cant work out whether they are handled
"automatically" by wininet
In other words, if I send subsequest Http Requests - either GETs or POSTs,
are the cookies appended automatically to the message or do I have to
manually append them in some way?
If I look at the cookies on my disk I see that some have been added with no
explicit action from my program - just accessing the site.
In fact I'm not that clear on the difference between InternetGetCookie() and
InternetSetCookie().
If InternetGetCookie gets the cookies from the server, and Wininet stores
them automatically on my machine, whats InternetSetCookie for?
Thanks in advance for any help.
and receive some session and persistent cookies. I dop a double check with
Would someone tell me how cookies are handled in wininet - I can't work out
whether I need to add the cookies to any GET or POST I send or whether they
are added automatically.
I log in to a site with HttpOpenRequest then HttpSendRequest.
The login seems to work fine and I receive some cookies back in the header.
I then execute an InternetGetCookie "for fun" and I get the "logged in"
session ID cookies and some persistent cookies back.
What do I do with them? I cant work out whether they are handled
"automatically" by wininet
In other words, if I send subsequest Http Requests - either GETs or POSTs,
are the cookies appended automatically to the message or do I have to
manually append them in some way?
If I look at the cookies on my disk I see that some have been added with no
explicit action from my program - just accessing the site.
In fact I'm not that clear on the difference between InternetGetCookie() and
InternetSetCookie().
If InternetGetCookie gets the cookies from the server, and Wininet stores
them automatically on my machine, whats InternetSetCookie for?
Thanks in advance for any help.
and receive some session and persistent cookies. I dop a double check with