From 2a64d0867b5ef0e35da4af099853e8fc904af43f Mon Sep 17 00:00:00 2001 From: Jed Reynolds Date: Mon, 2 Dec 2019 19:09:51 -0800 Subject: [PATCH] har-to-portal reads post data --- har-to-portal.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/har-to-portal.pl b/har-to-portal.pl index 33f070d6..a5d2bdfa 100755 --- a/har-to-portal.pl +++ b/har-to-portal.pl @@ -104,15 +104,20 @@ for my $request_start ( sort keys %ordered_entries ) { #print Dumper($entry); #print "REF: ".ref($entry); my $request = $$entry->{request}; - print Dumper($request); + #print Dumper($request); my $ra_headers = $request->{headers}; my $url = $request->{url}; - print "URL: $url\n"; + my $method = $request->{method}; + print "$method: $url\n"; + #print Dumper($request) if ($method eq "POST"); + for my $header_e (@$ra_headers) { - print "H: ".$header_e->{name} .": ".$header_e->{value} .NL; + print " H: ".$header_e->{name} .": ".$header_e->{value} .NL; + } + if ($method eq "POST") { + print " D: ".$request->{'postData'}->{text} .NL; } - last; } #die("unable to open $::outfile: $!") unless open($fh, ">", $::outfile);