Re: [twsocket] HttpCli and POSTDATA
So it looks like I have to parse each one and form a single entry for HttpCli.Cookie with just the name=value pairs, seperated by "; ". I'll try to do that now. I was used to the Indy cookie manager component which must have handled the parsing for me. I would rather do more things myself than use Indy though. Thanks, Johnnie -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
You need to grab all cookies sent by the server and send them back according to the expiration date/time and path associated with eachone. You can easily discover by yourself the simple format used. You can find cookies documentation link on the "links" page at my website. It is worth reading it :-) -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Johnnie Norsworthy" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Monday, September 25, 2006 8:14 PM Subject: Re: [twsocket] HttpCli and POSTDATA >I am trying to pick out the cookies from some header data, and I > noticed there are a few lines: "Set-Cookie:" > > Since I need to use the cookies in subsequent requests, do I need to > use the OnCookie event and combine all the cookies into one line? What > is used as the separator if so? Or is there a method to retrieve the > combined cookie and set it to the .Cookie property? > > Thanks, > Johnnie > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
I am trying to pick out the cookies from some header data, and I noticed there are a few lines: "Set-Cookie:" Since I need to use the cookies in subsequent requests, do I need to use the OnCookie event and combine all the cookies into one line? What is used as the separator if so? Or is there a method to retrieve the combined cookie and set it to the .Cookie property? Thanks, Johnnie -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
On Sep 24, 2006, at 20:51, Johnnie Norsworthy wrote: > Thanks; I know the header format, I just need to know how to apply the > POSTDATA string to the header before getting the page. > > I used a FireFox extension to get the POSTDATA format. The data of the POST is submitted in the BODY of the request, that is, right after the first blank line encountered after the headers, the same as in SMTP. dZ. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
Yes. and if you examine the source code, you will see that GET/GetAsync does not send the sendstream at all! Regards, SZ - Original Message - From: "Johnnie Norsworthy" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Monday, September 25, 2006 9:04 AM Subject: Re: [twsocket] HttpCli and POSTDATA :I found a HTTP Post example in the included demos. Now I just have to : snoop and find the exact requirements (cookies, etc.) for posting. : : I had to add the POSTDATA string to HttpCli.SendStream. : : Thanks, : Johnnie : -- : To unsubscribe or change your settings for TWSocket mailing list : please goto http://www.elists.org/mailman/listinfo/twsocket : Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
I found a HTTP Post example in the included demos. Now I just have to snoop and find the exact requirements (cookies, etc.) for posting. I had to add the POSTDATA string to HttpCli.SendStream. Thanks, Johnnie -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
Johnnie Norsworthy wrote: >> POSTDATA is not included in the header but like this: >> >> POST / HTTP/1.1 >> Host: www.overbyte.be >> >> username=user&password=pwd (POSTDATA HERE--just like content in GET) >> > > Thanks SZ, but how do I add that to a THttpCli before calling > .GetAsync? Is there an example in the ICS samples? > > -Johnnie > I apologize that I have not followed this thread completely, but if you plan to use POST, should you not be using .PostAsync? Cheers Mohit. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
> POSTDATA is not included in the header but like this: > > POST / HTTP/1.1 > Host: www.overbyte.be > > username=user&password=pwd (POSTDATA HERE--just like content in GET) Thanks SZ, but how do I add that to a THttpCli before calling .GetAsync? Is there an example in the ICS samples? -Johnnie -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
Hello, POSTDATA is not included in the header but like this: POST / HTTP/1.1 Host: www.overbyte.be username=user&password=pwd (POSTDATA HERE--just like content in GET) Regards, SZ - Original Message - From: "Johnnie Norsworthy" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Monday, September 25, 2006 3:51 AM Subject: Re: [twsocket] HttpCli and POSTDATA : Thanks; I know the header format, I just need to know how to apply the : POSTDATA string to the header before getting the page. : : I used a FireFox extension to get the POSTDATA format. : -- : To unsubscribe or change your settings for TWSocket mailing list : please goto http://www.elists.org/mailman/listinfo/twsocket : Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
Thanks; I know the header format, I just need to know how to apply the POSTDATA string to the header before getting the page. I used a FireFox extension to get the POSTDATA format. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli and POSTDATA
Not sure if this helps you.. but if you use Firefox, there is an extension called LiveHTTPHeaders. It shows you the sequence of communication between the browser and the server. It will help you analyze what is sent to and fro and in what sequence. Hope this helps. Cheers Mohit. Johnnie Norsworthy wrote: > I have been using fat URLs to retrieve a few web search page results, > but for one site I need to use POSTDATA in the request header. How do > I set my POSTDATA string before a THttpCli.GetAsync? > > Thanks, > > -Johnnie Norsworthy > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] HttpCli and POSTDATA
I have been using fat URLs to retrieve a few web search page results, but for one site I need to use POSTDATA in the request header. How do I set my POSTDATA string before a THttpCli.GetAsync? Thanks, -Johnnie Norsworthy -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be