?
Solved

Internet Headers...

Posted on 2004-08-11
7
Medium Priority
?
183 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:
Eddie Shipman earned 240 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:Eddie Shipman
ID: 11778634
in what way?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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:Eddie Shipman
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:Eddie Shipman
ID: 11779202
Comes in Indy9.
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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Loops Section Overview
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 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