perl6-http-client
perl6-http-client copied to clipboard
Content inaccessible
Any attempt to access the contents of an HTTP Response results in a crash, with an exception being thrown.
Exception:
Nominal type check failed for parameter '$str'; expected Str but got Array instead in sub unbase at gen/parrot/CORE.setting:6833 in block at lib/HTTP/Client/Response.pm6:113 in method dechunk at lib/HTTP/Client/Response.pm6:106 in method contents at lib/HTTP/Client/Response.pm6:140 in method content at lib/HTTP/Client/Response.pm6:146 in block at test.p6:7
Full source being used to test: 1 use v6; 2 use HTTP::Client; 3 4 my $client = HTTP::Client.new; 5 my $response = $client.get('http://www.whatismyip.com/'); 6 if $response.success { 7 say $response.content; 8 }
As explained on https://github.com/supernovus/perl6-http-client/issues/5#issuecomment-376493303 the dechunk method (on third line of the stack trace) is buggy.