Solved

Internet Headers...

Posted on 2004-08-11
7
174 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 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

20 Experts available now in Live!

Get 1:1 Help Now