summaryrefslogblamecommitdiff
path: root/eg/test.pl
blob: b77d0bb5a715ae2f8b77b219d55098315a6cf6ef (plain) (tree)




















                                                                                          
use strict;
use warnings;
use 5.010;

use Net::HTTP::Spore;

my $api = Net::HTTP::Spore->new_from_spec(shift, api_base_url => 'http://localhost:5000');

$api->enable('Net::HTTP::Spore::Middleware::Format::JSON');

$api->enable(
    'Net::HTTP::Spore::Middleware::Auth::Basic',
    username => 'admin',
    password => 's3cr3t'
);

my $content =
  $api->new_user( input => { user => { francktest => { name => 'franck' } } } );

use YAML::Syck;
warn Dump $content;