Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

[delphi] how to read response headers

Posted on 2011-02-20
4
Medium Priority
?
982 Views
Last Modified: 2012-05-11
I using http in delphi. How can i read response headers?  from POST i send one post like this:
http.Post('http://www.plemiona.pl/index.php?action=login&server_pl51?', Input2, Output2);

Open in new window

 i need to get response location where i can find session. Please help me
0
Comment
Question by:l3m0n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:l3m0n
ID: 34937060
i used it:
memo2.Lines:=http.Response.RawHeaders;

Open in new window

but i get different information then fiddler shows:
i get:
Connection: keep-alive
X-Powered-By: PHP/5.2.0-8+etch16
Cache-Control: no-cache
Pragma: no-cache
Content-type: text/html; charset=utf-8
Content-Length: 24947
Date: Sun, 20 Feb 2011 12:40:47 GMT
Server: lighttpd/1.4.19

fiddler gets:
HTTP/1.1 302 Found
Transfer-Encoding: chunked
X-Powered-By: PHP/5.2.0-8+etch16
Location: http://pl51.plemiona.pl/login.php?sid=0bafb06d929c&secret=0&mobile_no_force=0
Content-Encoding: gzip
Vary: Accept-Encoding
Content-type: text/html; charset=utf-8
Date: Sun, 20 Feb 2011 12:33:46 GMT
Server: lighttpd/1.4.19

i have done:
http.allowcookies := true;
http.HandleRedirects:=true;
0
 
LVL 24

Expert Comment

by:jimyX
ID: 34937288
Try:
memo2.Lines := http.Response.ResponseText;

Open in new window

0
 

Author Comment

by:l3m0n
ID: 34937346
ResponseText? it store: "HTTP/1.0 200 OK"
0
 
LVL 21

Accepted Solution

by:
developmentguru earned 2000 total points
ID: 34943699
I am not sure how much help I can be with this but, in order to try, I would need ALL of the parameters you passed.  I would need to know how you setup to do this.  I would also (very important) need to know what version of Delphi you are using (I only have 2010 and XE).  If you have any information about what tools were used to put the other end together that could help as well.  In the last few releases Delphi's handling of SOME of the headers data has changed quite a bit.

Once you have given me this information, I will see if I can help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question