You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

cURL Error when trying to use REST PACTH - PHP

Received Response
7
Views
1
Comments
edited Aug 9, 2016 1:43PM in Integrations and APIs 1 comment

Content

I am trying to update a CO, i have the following error returned : 

error:SSL read: error:00000000:lib(0):func(0):reason(0), errno 54

I tried everything and i still don't know how to successfully update this CO

Code Snippet

             curl_setopt($ch, CURLOPT_URL,trim("site.com/services/rest/connect/v1.3/CO.Emp/567"));
curl_setopt($ch, CURLOPT_USERPWD, $user . ":" . $pass);
curl_setopt($ch, CURLOPT_PORT, 443);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HEADER, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                                           'Content-Type: application/json',
                   

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!