OpenAPI::Client;
use Try::Tiny;
use Mojo::Content::Single;
use Mojo::Asset::Memory;
use JSON::XS qw(encode_json);
use Types::Serialiser qw();
field $api_key :param;
field $api_user :param;
field $ap
xt.oas/api';
field $client :accessor;
ADJUST {
my $definition = sprintf('data://%s/xential.json', ref $self);
$client = OpenAPI::Client->new($definition);
my $host = Mojo::URL->new();
>ua->on(
start => sub ($ua, $tx) {
$tx->req->headers->add("Accept" => "application/json");
unless ($tx->req->headers->header('XSessionID')) {
$tx->req->url->userinfo(