[Catalyst] firing a POST method with Test::WWW::Mechanize
Michael Reece
mreece at vinq.com
Mon Aug 6 17:52:22 GMT 2007
Test::WWW::Mechanize isa LWP::UserAgent, so why not..
# like LWP docs..
my $req = HTTP::Request->new(POST => $uri);
$req->content_type('application/x-www-form-urlencoded');
$req->content('foo=bar&omg=lol');
$mech->request($req);
ok($mech->success, 'POST succeeded');
On Aug 6, 2007, at 9:24 AM, Daniel McBrearty wrote:
> I want to do this by just making the POST request (not telling $mech
> to click/submit somewhere). I don't see any obvious way of doing it.
>
> any ideas?
>
> D
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
---
michael reece :: software engineer :: mreece at vinq.com
More information about the Catalyst
mailing list