File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ GetOptions(\my %opt,
1414 ' keep-client-headers' ,
1515 ' method=s' ,
1616 ' agent=s' ,
17+ ' request' ,
1718) || usage();
1819
1920my $url = shift || usage();
@@ -30,6 +31,7 @@ Recognized options are:
3031 --max-length <n>
3132 --method <str>
3233 --parse-head
34+ --request
3335
3436EOT
3537}
@@ -47,6 +49,11 @@ $res->remove_header(grep /^Client-/, $res->header_field_names)
4749 unless $opt {' keep-client-headers' } or
4850 ($res -> header(" Client-Warning" ) || " " ) eq " Internal response" ;
4951
52+ if ($opt {request }) {
53+ $res -> request-> dump ;
54+ print " \n " ;
55+ }
56+
5057$res -> dump (maxlength => $opt {' max-length' });
5158
5259__END__
@@ -101,6 +108,10 @@ By default B<lwp-dump> will not try to initialize headers by looking at the
101108head section of HTML documents. This option enables this. This corresponds to
102109L<LWP::UserAgent/"parse_head"> .
103110
111+ =item B<--request >
112+
113+ Also dump the request sent.
114+
104115=back
105116
106117=head1 SEE ALSO
You can’t perform that action at this time.
0 commit comments