PHP.SU

Программирование на PHP, MySQL и другие веб-технологии
PHP.SU Портал     На главную страницу форума Главная     Помощь Помощь     Поиск Поиск     Поиск Яндекс Поиск Яндекс     Вакансии  Пользователи Пользователи

Страниц (1): [1]

> Найдено сообщений: 1
Real_Farmer Отправлено: 09 Апреля, 2018 - 19:55:33 • Тема: CURL/ Не реагирует на запрос PUT • Форум: HTTP и PHP

Ответов: 1
Просмотров: 651
Пытаюсь отправить запрос на изменение вебХука на сервисе МойСклад.

Прошу помощи разработчиков на PHP.

Хочу обновить хуки.

$uri='https://online.moysklad.ru/api/remap/1.1/entity/webhook/aaf03f64-e465-11e6-7a31-d0fd0006c1e5';


$data =
'{
"enabled": false
}';


$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLINFO_HEADER_OUT, true);
curl_setopt($curl, CURLOPT_USERPWD, "$userName:$userPassword");
curl_setopt($curl, CURLOPT_USERAGENT, $user_agent);

curl_setopt($curl, CURLOPT_URL, $uri);
curl_setopt($curl, CURLOPT_PUT, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data)));

$response = curl_exec($curl);



Веб хук не меняется.

В чем ошибка?

Страниц (1): [1]
Powered by PHP  Powered By MySQL  Powered by Nginx  Valid CSS  RSS

 
Powered by ExBB FM 1.0 RC1. InvisionExBB