Friday, February 7, 2014

Re: curl_exec not working with Veeva Vault integration into CakePHP

Turns out I needed to add the following curl option:

    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);

I still had to format the json_response to get it to work properly:

    $json_utf8 = utf8_decode($json_response);
    $return = json_decode(str_replace("?", "", $json_utf8));

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: