X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Fhttp.pm;fp=FS%2FFS%2Fpart_event%2FAction%2Fhttp.pm;h=673cd4356c493aacec40aa18183da4b9c8a3cc80;hb=2748aaf4aa3f19e17a37edc07e89ee402108900d;hp=b8715a7148f4695cf30118d1aad616eadbcccc37;hpb=6d769244a6aa43877c04e227637c80ae1f0a410b;p=freeside.git diff --git a/FS/FS/part_event/Action/http.pm b/FS/FS/part_event/Action/http.pm index b8715a714..673cd4356 100644 --- a/FS/FS/part_event/Action/http.pm +++ b/FS/FS/part_event/Action/http.pm @@ -1,12 +1,16 @@ package FS::part_event::Action::http; +use base qw( FS::part_event::Action ); use strict; -use base qw( FS::part_event::Action ); +use vars qw( $me ); +use Data::Dumper; use LWP::UserAgent; use HTTP::Request::Common; -use JSON::XS; +use Cpanel::JSON::XS; use FS::Misc::DateTime qw( iso8601 ); +$me = '[FS::part_event::Action::http]'; + #sub description { 'Send an HTTP or HTTPS GET or POST request'; } sub description { 'Send an HTTP or HTTPS POST request'; } @@ -37,6 +41,10 @@ sub option_fields { type => 'textarea', }, #'response_error_param' => 'Response error parameter', + 'debug' => { label => 'Enable debugging', + type => 'checkbox', + value => 1, + }, ); } @@ -73,6 +81,9 @@ sub do_action { Content => $content, ); + if ( $self->option('debug') ) { + + } my $response = $ua->request($req); die $response->status_line if $response->is_error;