[rt-users] Is there a way to pretty much curl a webpage in a scrip?

Kevin Falcone falcone at bestpractical.com
Thu Jul 18 11:32:52 EDT 2013


On Tue, Jul 16, 2013 at 03:12:39PM +0000, Thomas  Misilo wrote:
>    I was wondering if there is an easy way to "curl" a file in a scrip? As I would like to use
>    this to generate a ticket. So pretty much [1]http://site/createtoken.php?tokenid={TicketID}

You can use perl's LWP module to make a request like that.
Keep in mind that Scrips are synchronous, so if you do this On Create,
you'll delay the web UI from returning until the external site
responds, so use a low timeout.

If the external site is unreliable, I suggest a cron job that runs
every 5 minutes to work on new tickets in the background.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130718/cde777f7/attachment.sig>


More information about the rt-users mailing list