[Rt-devel] http request in user-defined action
Arthur Wiebe
arthur at nerdsonsite.com
Fri Sep 9 15:35:00 EDT 2011
Hi everyone, I'm new to RT but have set it up and we are currently using it.
I want to have new tickets send out an iPhone Push Notification. I've
already written an HTTP API to use for it, and I created a custom
Scrip in RT to send the request to the API.
Here is my code:
-------------------
Custom action preparation code:
return 1;
Custom action cleanup code:
$request = HTTP::Request->new(GET => 'http://url/to/api');
$ua = LWP::UserAgent->new;
$response = $ua->request($request);
return 1;
------------------
Unfortunately that URL GET request never get's called. I know the
action is running because if I add code to change the ticket priority
it works.
Is there something I need to do to be able to use the HTTP::Request object?
Thanks for any tips you can help me with!
More information about the rt-devel
mailing list