Solved

Internet Headers...

Posted on 2004-08-11
7
177 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 267
Help on project with Soap 10 54
Delphi inherited method 6 70
Installshield for Embarcadero EX 10.1 Berlin 4 42
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

777 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