Permalink
Browse files

adding legacy api example

  • Loading branch information...
1 parent a733f96 commit 999d6a641d20e054a96c5a880ef84b9d58d91da9 @wesyoung wesyoung committed Jan 2, 2013
Showing with 24 additions and 0 deletions.
  1. +24 −0 experimental/legacy_example.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use LWP::UserAgent;
+use JSON::XS;
+use Data::Dumper;
+
+my $url = 'https://localhost?apikey=XXXX';
+
+my $ua = LWP::UserAgent->new();
+$ua->ssl_opts(verify_hostname => 0);
+$ua->default_header('Accept' => 'application/json');
+
+my $hash = {
+ address => 'example.com',
+ assessment => 'botnet',
+ confidence => 86,
+ description => 'zeus',
+};
+
+my $ret = $ua->post($url,Content => encode_json($hash));
+warn Dumper($ret);

0 comments on commit 999d6a6

Please sign in to comment.