diff options
Diffstat (limited to '')
| -rw-r--r-- | eg/test.pl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/eg/test.pl b/eg/test.pl new file mode 100644 index 0000000..b77d0bb --- /dev/null +++ b/eg/test.pl @@ -0,0 +1,21 @@ +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; |
