NAME

WebService::Mattermost::Role::UserAgent - Internal user agent role.

VERSION

version 0.29

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) 2020 by Mike Jones.

This is free software, licensed under:

The MIT (X11) License