<div dir="ltr">Hi,<div><br></div><div>I'm trying to write a scrip that sends a web request to an external server</div><div>and depending on the answer set a specific priority level</div><div><br></div><div>So far the web request goes out and the priority can be set. The only </div><div>missing part is that I can't get a hold of the external web server response.</div><div><br></div><div>Following, a few lines that I wrote in the 'custom action commit' section:</div><div><br></div><div>--- code<br></div><div><div>require LWP::UserAgent;</div><div>my $ua = LWP::UserAgent->new;</div><div><br></div><div>my $url = '<a href="https://extwebserv/'.somePieceOfData">https://extwebserv/'.somePieceOfData</a>;</div><div>my $response = $ua->get($url);</div><div><br></div><div>if ($response->is_success) {</div><div> # <b style="background-color:rgb(243,243,243)">FAILS!</b></div><div> RT::Logger->info($response->as_string); #decoded_content);</div><div> </div><div> my $newpriority = 100;</div><div><br></div><div> my ($status, $msg) = $self->TicketObj->SetPriority($newpriority);</div><div> unless ($status) {</div><div> $RT::Logger->warning("unable to set new priority value");</div><div> return undef;</div><div> }</div><div> return 1;</div><div>}</div></div><div>--- end code</div><div><br></div><div>Any help will be highly appreciated</div><div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Regards,<br><br>Hugo Escobar<br><br>
<div><a href="http://www.associationfinancialservices.com/" target="_blank"><img src="cid:part1.02030600.00030308@enflyer.com" height="26" width="126" border="0"></a><br><br></div>4770 Biscayne Blvd, Ste 700<br>Miami, FL 33137<br>
<br>main: 305.677.0022<br>support: 305.921.4620<br>email: <a href="mailto:hescobar@afslc.com" target="_blank">hescobar@afslc.com</a><br><br>Follow us on Facebook and Linked-In<br>
<div><a href="http://www.facebook.com/pages/Miami-FL/ASSOCIATION-FINANCIAL/64952991864" target="_blank"><img alt="" src="cid:part1.08060004.03030107@enflyer.com" height="24" width="24" border="0"></a> <a href="http://www.linkedin.com/companies/1006276" target="_blank"><img alt="" src="cid:part2.00090205.04060608@enflyer.com" height="24" width="24" border="0"></a> </div>
<br>NOTICE: This email and any attachment to this email may contain
confidential information. If you are not the intended recipient, you
must not review, retransmit, convert to hard copy, photocopy, use or
disseminate this email or any attachments to it. If you have received
this email in error, please notify us immediately by return email and
delete this message. Please note that if this email contains a forwarded
message or is a reply to a prior message, some or all of the contents
of this message or any attachments may not have been produced by our
firm. <b>As our firm may be deemed a debt collector, if your payment is
in default, we may be attempting to collect a debt on behalf of the
association, and any information obtained may be used for that purpose.</b><br></div></div>
</div></div>