sergot / http-useragent

Web user agent class for Perl 6.
MIT License
36 stars 39 forks source link

Error when posting numeric data #222

Closed JJ closed 5 years ago

JJ commented 5 years ago

If the data in a form is numeric, like here:

           my %data = :72foo, :bar<♵>;
           my $ua = HTTP::UserAgent.new;
           my $res;
           lives-ok { $res = $ua.post(URI.new($uri), %data, X-Foo => "foodle") }, "new make post";

it fails with an error

        # Type check failed in binding to parameter '$s'; expected Str but got Int (72)

This leads to several errors down the line, including perl6-community-modules/perl6-WWW#17 and finally rakudo/rakudo#2779