use base qw/Catalyst::Request Class::Accessor::Fast/;
use HTTP::Headers::Util qw(split_header_words);
+sub _insert_self_into {
+ my ($class, $app) = @_;
+ my $req_class = $app->request_class;
+ return if $req_class->isa($class);
+ if ($req_class eq 'Catalyst::Request') {
+ $app->request_class($class);
+ } else {
+ die "$app has a custom request class $req_class, "
+ . "which is not a $class; see Catalyst::Request::REST";
+ }
+}
=head1 NAME
the request object to faciliate writing REST-y code. Currently, these
methods are all related to the content types accepted by the client.
+Note that if you have a custom request class in your application, and it does
+not inherit from C<Catalyst::Request::REST>, your application will fail with an
+error indicating a conflict the first time it tries to use
+C<Catalyst::Request::REST>'s functionality. To fix this error, make sure your
+custom request class inherits from C<Catalyst::Request::REST>.
=head1 METHODS