Some more detail: $req
file: code/Validad::Tools::Role::OX::Request::ApiKey 61: 62: sub requires_api_key { 63: my $self = shift; 64: my $key = $self->api_key; 65: return $key if $key; 66: 67: http_throw( 'BadRequest' => { message => 'Please provide api key.' } ); 68: }
Shortcut to throw an error if the api-key is missing: