Group
Extension

Matches 2

Catalyst-TraitFor-Request-ContentNegotiationHelpers ( J/JJ/JJNAPIORK/Catalyst-TraitFor-Request-ContentNegotiationHelpers-0.006.tar.gz, JJNAPIORK, 2015; MetaCPAN )
Catalyst-TraitFor-Request-ContentNegotiationHelpers/lib/Catalyst/ActionRole/ProvidesMedia.pm ( view source; MetaCPAN )
uted if the request accept header like prefers and accepts
      # type 'application/json'.
      sub myaction_JSON :Action { }

      # Executed if the request accept header like prefers and accepts
xecuted if the request accept header like prefers and accepts
    # type 'application/json'.
    sub myaction_JSON :Action { }

    # Executed if the request accept header like prefers and accepts
   
Catalyst-TraitFor-Request-ContentNegotiationHelpers ( J/JJ/JJNAPIORK/Catalyst-TraitFor-Request-ContentNegotiationHelpers-0.006.tar.gz, JJNAPIORK, 2015; MetaCPAN )
Catalyst-TraitFor-Request-ContentNegotiationHelpers/lib/Catalyst/TraitFor/Request/ContentNegotiationHelpers.pm ( view source; MetaCPAN )
 {
      my ($self, $c) = @_;
      my $best_media_type = $c->req->choose_media_type('application/json', 'text/html');
    }

    sub choose :Local {
      my ($self, $c) = @_;
      my $body = $c->re
'no_match' => sub { 'none' },
        'text/html' => sub { 'html' },
        'application/json' => sub { 'json' });

      $c->res->body($body);
    }

    sub filter : Local {
      my ($self, $c) = 
 of the request to make decisions about what to do,
for example what format to return (HTML, XML, JSON, other).  This role can
be applied to your L<Catalyst::Request> to add some useful helper methods

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.