in reply to Re^3: GD and LWP giving 500 errors
in thread GD and LWP giving 500 errors
and it seems to work.$result=qx(curl -X POST --data "$query" 'https://www.paypal.com/cgi-bi +n/webscr');
The bit that is now confusing me is how to replace LWP's
is_error(status) and is_success(status)There is barely a mention of response codes in the curl documentation.
LATER...Thanks to a search of StackOverflow, I now have a working workaround that give me access to the response code
read (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; my ($head,$body) = split( m{\r?\n\r?\n}, qx(curl -X POST --data "$que +ry" -si 'https://www.paypal.com/cgi-bin/webscr'),2 ); my ($code) = $head =~m{\A\S+ (\d+)};
|
|---|