The Response should be XML, but I'm getting error like:
(56): Failure when receiving data from the peer
while sending the request to REST API using headers. Here is the sample request according to the client:
POST http://api.toyotautrust.in/1.0/olx/inventory HTTP/1.1User-Agent: FiddlerAuthorization: Token ******-****-****-****-***********Host: api.toyotautrust.inContent-Length: 52
Here is my Request code written in PHP using cURL
$headers1=['POST /1.0/olx/inventory HTTP/1.1','Host: api.toyotautrust.in','User-Agent: Fiddler','Authorization: Token' .$atoken1,'Content-Length: 52'];$ch1 = curl_init();curl_setopt($ch1, CURLOPT_URL, 'http://api.toyotautrust.in/1.0/olx/inventory');curl_setopt($ch1, CURLOPT_POST, true);curl_setopt($ch1, CURLOPT_HEADER, true);curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch1, CURLOPT_HTTPHEADER,$headers1);$response1 = curl_exec($ch1);print_r($response1);$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);echo $status_code1;