;
use List::Util qw/pairmap/;
use LWP::UserAgent qw//;
use HTTP::Cookies qw//;
use Aion::Format::Json qw//;
use Aion::Format::Url qw//;
use Exporter qw/import/;
our @EXPORT = our @EXPORT_OK = grep {
$json = delete $set{json};
$json = $data, undef $data if not defined $json and ref $data eq "HASH";
if(defined $json) {
$validate_data->();
$request->header('Content-Type' => 'application/json;
charset=utf-8');
$data = Aion::Format::Json::to_json $json;
utf8::encode($data) if utf8::is_utf8($data);
$request->content($data);
}
my $form = delete $set{form};
$form = $data, undef $data