aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-07-29 18:25:31 +0100
committerStruan Donald <struan@exo.org.uk>2011-07-29 18:25:31 +0100
commit691eae96495b02d100e9afd44baf05e056d75f5d (patch)
tree6f9816674c6c84594b0630d3a6cae814be5bf974 /perllib/Open311.pm
parente7ccf3fe896a9f642306daff9a750f3c9a6b7cdd (diff)
use module and conf from database for service list updates
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index a5fb060e3..4d29753a2 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -4,6 +4,7 @@ use URI;
use Moose;
use XML::Simple;
use LWP::Simple;
+use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
has jurisdiction => ( is => 'ro', isa => 'Str' );;
@@ -110,13 +111,14 @@ sub _post {
$uri->path( $uri->path . $path );
use Data::Dumper;
- my $req = POST $uri->as_string;
+ my $req = POST $uri->as_string,
[
jurisdiction_id => $self->jurisdiction,
api_key => $self->api_key,
%{ $params }
];
+ my $ua = LWP::UserAgent->new();
my $res = $ua->request( $req );
if ( $res->is_success ) {