### ----------------------------------------------------
### -- Bailador
### -- Licenses: MIT
### -- Authors: Tadeusz “tadzik” Sośnierz, Anthony Parsons, Carl Masak, Gabor Szabo, GlitchMr, Moritz Lenz, Panu Ervamaa, Paul Cochrane, Solomon Foster, Sterling Hanenkamp, Tobias Leich, ugexe, vendethiel, Martin Barth (ufobat), Emeric Fischer, Julien Simonet (jsimonet)
### -- File: t/05-post-content.t
### ----------------------------------------------------
use v6.c;

use Test;

use Bailador;
use Bailador::Test;

plan 3;

post '/foo' => sub { request.env<p6w.input>.decode };

my $data = 'hello=world&a=1;b=2';
my $req  = Bailador::Request.new_for_request('POST', '/foo');
   $req.env<p6w.input> = $data.encode('utf-8');
skip 'fails with precompilation', 3;
#my $resp = Bailador::dispatch_request($req);
#
#lives_ok { eager $req.params<hello> }, 'Request data parses without dying';
#is ~$resp.content, $data,   'POST data string roundtrips correctly';
#is $req.params<a>, '1;b=2', 'application/x-www-form-urlencoded POST data should only split on &';


