Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:07:29+00:00 2026-06-10T20:07:29+00:00

Have a web-page with very complex structure and javascript logic with many ajax calls,

  • 0

Have a web-page with very complex structure and javascript logic with many ajax calls, some requests only got a respond pure (applicaton/json) objects, some ajax gets html and so on… ;(

Need analyze the full communication between the browser and server, so decided write a perl-proxy what “simple” dump all text communication in any direction (requests and responses too).

Found the HTTP::Proxy module, but im totally confused with the filters.

The basic code:

use strict;
use warnings;
use HTTP::Proxy;

my $proxy = HTTP::Proxy->new( port => 3128 );
$proxy->start;

works nicely, but i havn’t any idea how to write the filters for it.

The “eg” directory in the distribution have milion complicated examples how to modify the response body contents and so on, but the basic dump_all_communication is missing.

Can anybody guide me, how to write a simple filter for:

  • dump out all http-requests what are going from browser to server
  • and dump out the content of all responses, when they have mime: text/* and application/json and application/x-javascript (or better: for anything but no images, pdf and flash)

Here is similiar question, but it is want filter JSON and me want more simple – dump everything (all requests and all responses (but no images))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:07:31+00:00Added an answer on June 10, 2026 at 8:07 pm

    Based on one example, I would do this. It simply print out to the stderr everything that go through in this proxy.

    Adjust your filter accordingly.

    Regards,

    {
        package DumpAllBody;
        use base qw( HTTP::Proxy::BodyFilter );
        use Data::Dumper;
        sub filter {
            my ( $self, $dataref, $message, $protocol, $buffer ) = @_;
            warn "Body:\n".Dumper($dataref,$message,$protocol,$buffer);
        }
    }
    {
        package DumpAllHeader;
        use base qw( HTTP::Proxy::HeaderFilter );
        use Data::Dumper; 
        sub filter {
            my ( $self, $headers, $message ) = @_;
    
            warn "Body:\n".Dumper($headers,$message);
        }
    }
    $proxy->push_filter( request  => DumpAllHeader->new(), response => DumpAllHeader->new());
    $proxy->push_filter( request  => DumpAllBody->new(),   response => DumpAllBody->new());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very general web page where I display information. I have this
I have a web page that prompts for user input via DropDownLists in some
I have a web page that sends information via AJAX to a server. I
I have a 'very' simple web page I've thrown together using VideoJS to playback
I have a very simple YUI3 script which changes background of a web page.
My question is very simple: In an averagely complex web request, usually we have
I have a web page on a which does some database updates (e.g. http://www.mysite.com/updates.asp
I have a main web page (Base Page) that makes an ajax call (using
I'm brand new to all things .NET. I have a very basic web page
I have a very AJAX-ish listing webpage created using Codeigniter where I want registered

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.