R
RogerF
Hello... don't do alot of perl scripting so I am not well experienced
with scripting...
I want to return the values from a simple http request in a perl
script.
So for example, if I have a http request on a server such as:
http://<server>/servlet/inbasket?RDUSER=pfuser&FUNCTION=gettasks
And the return of the URL is:
<?xml version="1.0" ?>
- <INBASKET>
<USERTASKS userid="" returnmsg="No tasks set up for workflow user
pfuser" msgtype="Error" />
</INBASKET>
I want to take the returnmsg value ("No tasks set up for workflow user
pfuser") from the request and send it to an email recipient.
Just looking for the syntax of the Http request and how to get the
return values
require HTTP::Request;
$request = HTTP::Request->new(GET => 'http://<server>/servlet/inbasket?
RDUSER=pfuser&FUNCTION=gettasks');
....
....
....
$response = $ua->request($request)
if ($response->is_success) {
print $response->content;
}
else {
print STDERR $response->status_line, "\n";
********************************************************************
So how do I get the value of returnmsg??? Can I somehow parse out
'content'??
Needing just a little help to get this syntax correct.
Thanks in advance for your assistance.
-Roger
with scripting...
I want to return the values from a simple http request in a perl
script.
So for example, if I have a http request on a server such as:
http://<server>/servlet/inbasket?RDUSER=pfuser&FUNCTION=gettasks
And the return of the URL is:
<?xml version="1.0" ?>
- <INBASKET>
<USERTASKS userid="" returnmsg="No tasks set up for workflow user
pfuser" msgtype="Error" />
</INBASKET>
I want to take the returnmsg value ("No tasks set up for workflow user
pfuser") from the request and send it to an email recipient.
Just looking for the syntax of the Http request and how to get the
return values
require HTTP::Request;
$request = HTTP::Request->new(GET => 'http://<server>/servlet/inbasket?
RDUSER=pfuser&FUNCTION=gettasks');
....
....
....
$response = $ua->request($request)
if ($response->is_success) {
print $response->content;
}
else {
print STDERR $response->status_line, "\n";
********************************************************************
So how do I get the value of returnmsg??? Can I somehow parse out
'content'??
Needing just a little help to get this syntax correct.
Thanks in advance for your assistance.
-Roger