ently
=cut
use Params::Validate qw(:all);
use LWP::UserAgent;
use Encode;
use MIME::Base64;
use JSON::XS;
use File::Slurp;
use Pootle::Logger;
my $l = bless({}, 'Pootle::Logger'); #Lazy load packag
nd error handling
@RETURNS List of 0 - HTTP::Response
1 - HASHRef of response JSON payload
@THROWS Pootle::Exception::HTTP::MethodNotAllowed endpoint doesn't support the given met
ponse, $contentHash)) if $l->is_trace();
} catch {
if ($_ =~ /^malformed JSON string/) { #Presumably this is a JSON::XS issue
my $errorStr = $s->_httpResponseToLoggableFromFail($response);