d1 METHODS
=over 4
=cut
package AtteanX::Endpoint {
use Moo;
use Attean;
use TryCatch;
use JSON;
use Encode;
use Plack::Request;
use Plack::Response;
use Scalar::Util qw(blessed refaddr);
ication/json-problem', 0.99, 'application/json-problem'],
);
my $headers = $req->headers;
my $stype = choose( \@variants, $headers ) || 'text/plain';
if ($stype eq 'application/json-proble
m') {
$resp->headers->content_type( 'application/json-problem' );
$resp->status($code);
my $content = encode_json($error);
$resp->body($content);
} else {
$resp->headers->conten