never had any idea downloading plain text would be so difficult..
This is what finally worked....
use LWP::UserAgent (); use parent 'HTTP::Message'; $mess = HTTP::Message->new(); $mess->encode(gzip,deflate); $filename='/temp/edgar/workfile.txt'; $url='https://www.sec.gov/Archives/edgar/daily-index/2023/QTR3/form.20 +230712.idx'; my $ua = LWP::UserAgent->new(timeout => 10); $ua->default_header('Accept-Encoding' =>$mess = HTTP::Message->new()); $ua->default_header( USER_AGENT =>'COMPANY youremail@email.com' ); my $res = $ua->mirror( $url, $filename );
In reply to Re^10: HTTP response: 400 Bad Request
by justin423
in thread HTTP response: 400 Bad Request
by JoeJohnston
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |