Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding legacy api example

  • Loading branch information...
commit 999d6a641d20e054a96c5a880ef84b9d58d91da9 1 parent a733f96
@wesyoung wesyoung authored
Showing with 24 additions and 0 deletions.
  1. +24 −0 experimental/legacy_example.pl
View
24 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);
Please sign in to comment.
Something went wrong with that request. Please try again.