Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Copy contents passed in Firefox live http header

by vjkrish (Initiate)
on Sep 24, 2013 at 07:03 UTC ( #1055456=perlquestion: print w/ replies, xml ) Need Help??
vjkrish has asked for the wisdom of the Perl Monks concerning the following question:

hi, is there a way to copy content passed in firefox "live http headers" extension using perl script

Comment on Copy contents passed in Firefox live http header
Re: Copy contents passed in Firefox live http header
by Anonymous Monk on Sep 24, 2013 at 07:18 UTC
    probably not, the good thing is, you can save "live http headers" to a file
Re: Copy contents passed in Firefox live http header
by Corion (Pope) on Sep 24, 2013 at 07:22 UTC

    The closest thing to that I know is HTTP::Request::FromTemplate, which allows you to use the plaintext of an HTTP request dump.

    In the long run I never found much use for the module, as it does not integrate well with other tools like WWW::Mechanize, at least not for my use cases. It is very useful for determining the exact criteria needed to replay and parametrize a request, but never found its way into permanent scripts.

Re: Copy contents passed in Firefox live http header
by keszler (Priest) on Sep 24, 2013 at 10:09 UTC
    Are you interested in what Firefox sends, or in what you receive back from the HTTP server?

    If the latter there are many Perl modules that will capture those, for example

    • LWP::Simple has head($url) returning ($content_type, $document_length, $modified_time, $expires, $server)
    • WWW::Mechanize has $mech->dump_headers( [$fh] ) which will print all the response headers to the given filehandle or STDOUT.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1055456]
Approved by hdb
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2014-07-28 22:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (210 votes), past polls