Sterh has asked for the wisdom of the Perl Monks concerning the following question:
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Can't connect to els...") at /usr/local/lib/perl5/site_perl/5.14.2/JSON.pm line 171.
Thank you, Dmitrymy $client = REST::Client->new(); $client->addHeader('Authorization', 'Basic YWRtaW46cmFyaXRhbg=='); $client->addHeader('content_type', 'application/json'); $client->addHeader('accept', 'application/json'); $client->setHost('https://host'); $client->setTimeout(1000); $req = '/api/v2/devices?name_eq=193456'; $client->request('GET', qq($req)); $data1 = from_json($client->responseContent());
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: REST call from CGI do not work
by tobyink (Canon) on May 24, 2012 at 23:40 UTC | |
by Sterh (Novice) on May 25, 2012 at 00:09 UTC | |
by Anonymous Monk on May 25, 2012 at 01:11 UTC | |
|
Re: REST call from CGI do not work
by locked_user sundialsvc4 (Abbot) on May 25, 2012 at 12:01 UTC | |
by Sterh (Novice) on Jun 06, 2012 at 00:38 UTC | |
by Anonymous Monk on Jun 06, 2012 at 01:40 UTC |