I am confused in sending this XML data in a api which I am using. This is what I have done..
$url = 'https://' . $koleId . ':' . $koleApi . '@http://ift.tt/1BiME6s';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: application/vnd.koleimports.ds.order+xml'
));
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
curl_close($ch);
$output = json_decode($result);
Should I send my XML data by this:
curl_setopt($ch, CURLOPT_POSTFIELDS,"xml=" . $xml);
When I am trying to send the XML by this, it give me error.. "40001Request body is malformed or missing."
This is what they required: Thanks for you help and looking into this.
No comments:
Post a Comment