in reply to json return value
You're not checking whether the response is an HTTP success...
my $req = POST( "http://myurl/public_html/cgi-bin/json-addition.cgi", Content_Type => 'application/json', Content => $json->encode($data), ); my $response = $ua->request($req); $response->is_success or die($response->status_line); my $result = $json->decode($response->decoded_content); print $result->{c}, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: json return value
by vsespb (Chaplain) on Jul 11, 2013 at 12:17 UTC | |
|
Re^2: json return value
by stenasc (Novice) on Jul 13, 2013 at 22:17 UTC | |
by tobyink (Canon) on Jul 14, 2013 at 01:36 UTC | |
by stenasc (Novice) on Jul 14, 2013 at 22:27 UTC | |
by tobyink (Canon) on Jul 15, 2013 at 05:45 UTC | |
by stenasc (Novice) on Jul 15, 2013 at 07:42 UTC | |
| |
by stenasc (Novice) on Jul 15, 2013 at 20:44 UTC | |
| |
by Anonymous Monk on Jul 14, 2013 at 23:44 UTC |