Answer the question
In order to leave comments, you need to log in
Why does 1C-Bitrix REST API not accept POST?
There is a 1C-Bitrix distribution kit installed on your server.
With grief in half, I set up the API and created a Webhook.
But the problem is that the hook refuses to accept POST requests - only GET. Took a standard example from the reference book:
$queryUrl = sute.ru/catalog.section.add
$queryData = http_build_query(array(
'fields' => array(
"iblockId"=>1,
"name"=>'NAME',
"code"=>'CODE',
"image"=>'image_base64'
),
'params' => array("REGISTER_SONET_EVENT" => "Y")
));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
));
$result = curl_exec($curl);
curl_close($curl);
var_dump($result);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question