use HTTP::Request::Common qw( GET PUT POST DELETE );
{
- request(
- GET '/foo',
- [
- Accept => 'application/json',
- ]
- );
+ request( GET '/foo', ( Accept => 'application/json' ) );
is(
$MyApp1::Controller::C1::REQ{get}, 1,
'GET request for /foo went to the right sub'
);
- request(
- GET '/foo',
- [
- Accept => '*/*',
- ]
- );
+ request( GET '/foo', ( Accept => '*/*', ) );
is(
$MyApp1::Controller::C1::REQ{get_html}, 1,
}
{
- get('c1/bar');
+ request( GET 'c1/bar', ( Accept => 'application/json' ) );
is(
$MyApp1::Controller::C1::REQ{get}, 2,
'GET request for c1/bar went to the right sub'
);
- request(
- GET 'c1/bar',
- [
- Accept => '*/*',
- ]
- );
+ request( GET 'c1/bar', ( Accept => '*/*', ) );
is(
$MyApp1::Controller::C1::REQ{get_html}, 2,