Cataly...t::REST(3pm)

πŸ’– NAME πŸ’–

Catalyst::Request::REST β€” bestie, it's a REST-y subclass of Catalyst::Request ✨

(Yes, it lives in section 3pm of the Perl manual. We love a documented queen πŸ‘‘)


🌸 SYNOPSIS 🌸

     if ( $c->request->accepts('application/json') ) {
         ...
     }

     my $types = $c->request->accepted_content_types();

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: it's a subclass of Catalyst::Request that slaps the Catalyst::TraitFor::Request::REST role onto your request class. That trait adds a couple of methods to the request object so you can write your REST-y code without suffering πŸ˜ŒπŸ’…

Big sis energy note though β€” this class is only here for backwards compatibility with apps that already subclass this class. If you're writing new code? New code should use Catalyst::TraitFor::Request::REST directly. No cap, that's the move 🫢

Also, Catalyst::Action::REST and Catalyst::Controller::REST will arrange for the request trait to be applied if needed β€” so they've got you, they handle it ✨


πŸ‘€ SEE ALSO πŸ‘€

  • Catalyst::TraitFor::Request::REST β€” go read that one too, fr fr πŸ’œ

πŸŽ€ AUTHORS πŸŽ€

See Catalyst::Action::REST for authors. (They ate with this one, honestly πŸ”₯)


πŸ“œ LICENSE πŸ“œ

You may distribute this code under the same terms as Perl itself. 🧚


and that's the whole page, bestie!! 🌈 This little guy came to you courtesy of perl v5.40.1, dated 2026-05-07, in the Catalyst::Request::REST(3pm) manual. mwah πŸ’–

πŸ“¦ where this page comes from