I'm trying to use Google's URL shortener service. The call from the command line succeeds:
curl -v https://www.googleapis.com/urlshortener/v1/url -H 'Content-Type: application/json' -d '{"longUrl": "http://www.google.com"}'
However, the equivalent using WWW::Curl::Easy returns an error code of 77. We've checked that the ca-bundle.crt
file is world-readable as suggested in this answer. I'm really stumped. Any suggestions of things to try would be appreciated.
The Perl code works on our development server but is failing on the staging server so the code is correct.