summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-12-13 15:29:00 -0800
committerIvan Kohler <ivan@freeside.biz>2015-12-13 15:29:00 -0800
commit0a2c29c0f22bee8cb30ef4eea31881ab1ae525f7 (patch)
tree60124fdad24ea6fa1561699b2be55edb887491e8 /FS/FS/part_event/Action
parent9e0a36966f7cbd8fd1584ce2a88c61448a5cec68 (diff)
JSON::XS -> Cpanel::JSON::XS
Diffstat (limited to 'FS/FS/part_event/Action')
-rw-r--r--FS/FS/part_event/Action/http.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/FS/FS/part_event/Action/http.pm b/FS/FS/part_event/Action/http.pm
index b8715a7..673cd43 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;