http-useragent
http-useragent copied to clipboard
Web user agent class for Perl 6.
Spotted this [in a travis run](https://travis-ci.org/zoffixznet/perl6-WWW-P6lert/jobs/322747567#L1650): ``` [...] # NETWORK_TESTING was not set t/200-w3-test-encodings.t .. ok t/210-content-encoding.t ... ok t/220-binary-content.t ..... ok t/230-binary-request.t ..... ok # Failed test 'right exception...
There's a test in `080-ua.t` that expects old rakudo.org website. ```perl6 lives-ok { HTTP::UserAgent.new.get('http://rakudo.org') }, "issue#51 - get rakudo.org (chunked encoding foul-up results in incomplete UTF-8 data)"; ``` I'm assuming...
The site `http://eckva.net` does not set encoding in its `Content-type` header. I believe this module default to an incorrect encoding (ASCII) in such cases, as that site works fine in...
I was expecting this code to work: ```perl6 my $ua = HTTP::UserAgent.new(timeout => 10); say $ua # HTTP::UserAgent.new(timeout => 180, …) ``` But it doesn't, and it seems like I...
All the headers are being passed around in a Hash, which doesn't keep around the order in which the items were added. Rakudo implementation used to preserve the order as...
[This example](https://github.com/sergot/http-useragent/blob/master/examples/ex_readme.p6) gives the following errors: ``` Internal Error: 'server returned no data' in block at /Applications/Rakudo/share/perl6/site/sources/FD28A8E22DFE16B70B757D9981C7B6C25543060C (HTTP::UserAgent) line 259 in any at /Applications/Rakudo/share/perl6/site/precomp/F91BAB44DF15C5C298C627DD5E0F9D819ED79939.1517344679.60204/FD/FD28A8E22DFE16B70B757D9981C7B6C25543060C line 1 in method new at...
I don't think IO::Socket::SSL should be a hard dependency. This causes problems with Rakudo Star since it doesn't include OpenSSL. In the forthcoming release I'll probably have to stick with...
```perl6 use HTTP::UserAgent; await (for 1..10 { start { my $ua = HTTP::UserAgent.new(useragent => 'ie_w7_64', :throw-exceptions); my $res = $ua.get("https://github.com"); #my $res = $ua.get("http://polyglot.by/"); say $res.status-line; } }) ``` generates:...
in case of 4xx 5xx errors you don't throw any exceptions and just return response as is ```perl6 if $!throw-exceptions { given $response.code { when /^4/ { X::HTTP::Response.new(:rc($response.status-line), :response($response)).throw; }...
I happily discovered that the `multipart/form-data` handling here is close to what you can do with LWP in Perl. However, while something like this will work fine: ```perl6 my $req...