Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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

Replies are listed 'Best First'.
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.
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

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 exploiting the Monastery: (7)
As of 2016-09-29 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (552 votes). Check out past polls.