I'm developping a google app using php. I need to consume REST service from Podio using the Podio-php API. But it uses cURL and I know it's not allowwed on GAE. So I tried tweaking the podio-php lib to use file_get_contents through a curl Emulator. Works fine locally, but when I deploy it, nothing works. I get this error message:
Warning: file_get_contents(https://api.podio.com:443/oauth/token): failed to open stream: Invalid headers. Must be a string. in /base/data/home/apps/s~wt-project1/9.374066902612513343/static/curlEmulator.php on line 167
And then, I get no responses and it breaks all the app.
Anyone has an idea from where the problems comes?
Here is the call:
$options = array(
"ssl"=>array(
"allow_self_signed"=>true,
"verify_peer"=>false,
),
'http' => array(
'method' => $method,
'header' => $this->getValue(CURLOPT_HTTPHEADER),
'content' => $content
)
);
$context = stream_context_create($options);
file_get_contents($this->CURLOPT_URL, false, $context);
Thanks!