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 }
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 }