Solved

Internet Headers...

Posted on 2004-08-11
7
180 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-
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can Viruses spread while transferring Binary data with Winsock 2 107
Delphi 2 91
can't find the executable in Simulator 1 130
firemonkey Android Listview Sort items 7 106
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

738 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