);
# Content-Type: application/json
use JSON::XS;
$client->header('Content-Type', 'application/json')
->post(
encode_json({ foo => 1 }),
sub {
= @_;
# ...
}
);
$client->header('Accept', 'application/json')
->query({ key => 'value' })
->query('key', 'value')
->get(