Arroze has asked for the wisdom of the Perl Monks concerning the following question:
Question: How would I use LWP (or similar lib/mod) to get HTTP headers? (not just the HTML code after the 'Content-type' in the header)
I have a script that will sucessfully get HTML code from a remote web server, that's not a problem at all. I've been reading all over the place and even looking at the LWP source to no avail. The reason I want to get the headers is because I need to view all the data my web server spews out as a result of a HTTP request. I need to see if a cookie is being passed back to the client, and capture it. If anyone can tell me that I'm going about this all wrong and why, or that there's a simple mehod of getting an entire HTTP response (not just the HTML code after the 'Content-type') that'd be great!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Obtaining HTTP Headers using LWP
by Fastolfe (Vicar) on Feb 07, 2001 at 05:10 UTC | |
|
Re: Obtaining HTTP Headers using LWP
by Arroze (Initiate) on Feb 07, 2001 at 05:14 UTC |