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::Mattermost::Role::UserAgent - Internal user agent role.

VERSION

version 0.30

DESCRIPTION

Bundles Mojo::UserAgent and required parameters for HTTP headers.

USAGE

use Moo;

with 'WebService::Mattermost::Role::UserAgent';

sub something {
    my $self = shift;

    my $bearer_header = $self->bearer;
    my $mmauthtoken   = $self->mmauthtoken;

    # Methods from Mojo::UserAgent
    $self->ua->post(
        # ...
    );
}

ATTRIBUTES

ua

A Mojo::UserAgent object.

METHODS

mmauthtoken()

Formats the MMAUTHTOKEN header.

bearer

Formats the Bearer header.

AUTHOR

Mike Jones <mike@netsplit.org.uk>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by Mike Jones.

This is free software, licensed under:

The MIT (X11) License