projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JSON::XS -> Cpanel::JSON::XS
[freeside.git]
/
FS
/
FS
/
part_event
/
Action
/
http.pm
diff --git
a/FS/FS/part_event/Action/http.pm
b/FS/FS/part_event/Action/http.pm
index
b8715a7
..
673cd43
100644
(file)
--- 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;
package FS::part_event::Action::http;
+use base qw( FS::part_event::Action );
use strict;
use strict;
-use base qw( FS::part_event::Action );
+use vars qw( $me );
+use Data::Dumper;
use LWP::UserAgent;
use HTTP::Request::Common;
use LWP::UserAgent;
use HTTP::Request::Common;
-use JSON::XS;
+use
Cpanel::
JSON::XS;
use FS::Misc::DateTime qw( iso8601 );
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'; }
#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',
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,
);
Content => $content,
);
+ if ( $self->option('debug') ) {
+
+ }
my $response = $ua->request($req);
die $response->status_line if $response->is_error;
my $response = $ua->request($req);
die $response->status_line if $response->is_error;