bigup401 has asked for the wisdom of the Perl Monks concerning the following question:
am having script working on my pc. but when i host it to web hosting provider space. i get this error
malformed JSON string, neither tag, array, object, number, string or a +tom, at character offset 0 (before "Can't connect to ip...")
but works on my pc very well. i think its hosting provider problem blocking connection
here is my code
my $req = HTTP::Request->new(POST => 'http://ip:4000'); $req->content_type('application/x-www-form-urlencoded'); $req->content_type('application/json'); my $res = $ua->request($req); $respons = JSON::XS->new->decode ($res->content); $dat = $respons->{data}; $adat1 = $respons->{name};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: http ip connection
by Corion (Patriarch) on Jun 20, 2017 at 10:37 UTC | |
by bigup401 (Pilgrim) on Jun 20, 2017 at 11:04 UTC | |
by bigup401 (Pilgrim) on Jun 20, 2017 at 11:59 UTC | |
by bigup401 (Pilgrim) on Jun 20, 2017 at 12:59 UTC |