The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WebService::Raygun::Message::Request - Encapsulate the data in a typical HTTP request.

SYNOPSIS

    sub request_handler {
        my $c = shift;     

        try {
                # error code
            } 
            catch {
    
                my $raygun = WebService::Raygun::Messenger->new(
                    api_key => '<your raygun.io api key>',
                    message => {
                        ...
                        request => $c->request, # HTTP::Request object
                        ... 
                    }
                );
                $raygun->fire_raygun;
        };
    }

DESCRIPTION

You should not need to instantiate this class directly. When creating an instance of WebService::Raygun::Messenger, just pass in the request object for your framework. See below for a list of types.

INTERFACE

prepare_raygun

Return the data structure that will be sent to raygun.io.

DEPENDENCIES

SEE ALSO

Here is the list of supported request types. I haven't experimented with all of them yet, but most of them have similar interfaces and thus should work.

HTTP::Request
Catalyst::Request
Mojo::Message::Request
Dancer::Request
Dancer2::Core::Request
Plack::Request
HTTP::Engine::Request