Solved

Internet Headers...

Posted on 2004-08-11
7
176 Views
Last Modified: 2010-04-05
Hey,

How can I navigate to a page using Indy and get the headers from that page,
The headers should look somethink like:-

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Date: Mon, 01 Jan 2000 12:00:00 GMT

Also I need how to send custom headers to the page like, Authorization.

GET /login.asp HTTP/1.1
Authorization: Blah Data
0
Comment
Question by:-Karamja-
  • 4
  • 3
7 Comments
 
LVL 26

Accepted Solution

by:
EddieShipman earned 60 total points
ID: 11777716
For the first one, using TidHTTP, you can do this:

idHTTP1.Head('http://www.austinmetrobaseball.com');
Memo1.Lines.Text := idHTTP1.ResponseText + #13 +
idHTTP1.Response.RawHeaders.Text;
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 11778004
Thanks, I worked out how to send custom headers I think,

Any idea on how to get it to connect to a https:// url
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 11778634
in what way?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Author Comment

by:-Karamja-
ID: 11778697
idHTTP1.Head('https://www.google.com/'); Any https url wont work
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 11778742
Add a IdSSLIOHandlerSocket and assign it to the idHTTP's IOHandler property.
Set the SSL parameters and away you go. Make sure you have AN SSL library installed.
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 11778777
Dont have IdSSLIOHandlerSocket :(
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 11779202
Comes in Indy9.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now