Calling an API from replying to requestor [Request Tracker]

267 Views Asked by At

I was trying to make a custom action where in I have to call a URL and pass parameter upon replying to a ticket from request tracker.

Tried to put this but did not call the URL

my $command = "curl -X GET 'http://www.example.com/test.php?m=1&msg=testing+1234'";

my $output = `$command`;
1

There are 1 best solutions below

1
On

Rather than calling out to the shell to run curl, I would recommend using a module like LWP::UserAgent. You can see in the Synopsis the few lines of code to call an external resource. You can use modules in a scrip.