ruqui has asked for the wisdom of the Perl Monks concerning the following question:
but if I try to get the same information using Perl I failed:curl -X GET --header 'Accept: application/json' 'https://ptabdata.uspt +o.gov/ptab-api/documents'
here's the output when I execute the perl script:use LWP::UserAgent; my $url = 'https://ptabdata.uspto.gov/ptab-api'; my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0, SSL_verify_mode => 'SSL_VERIFY +_NONE' }, cookie_jar => {}, ); my $response = $ua->get( "$url/documents", 'Accept' => 'application/js +on' ); print $response->content;
what am I doing wrong?Can't connect to ptabdata.uspto.gov:443 Connection reset by peer at /System/Library/Perl/Extras/5.18/LWP/Proto +col/http.pm line 51.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't connect to https using LWP::UserAgent
by hippo (Archbishop) on Feb 08, 2017 at 08:31 UTC | |
|
Re: Can't connect to https using LWP::UserAgent
by madtoperl (Hermit) on Feb 08, 2017 at 07:10 UTC | |
by ruqui (Acolyte) on Feb 08, 2017 at 10:24 UTC | |
by vkhera (Novice) on Feb 08, 2017 at 14:11 UTC |