vam
Новичок
Приветствую! Помогите новичку разобраться как выполнить такой cURL запрос в PHP
Что нужно добавить в
Код:
curl --location --request POST 'https://api.site.ru/v1/projects/123456789/folders' \
--data-raw '{
"name": "New folder"
}'
PHP:
$ch = curl_init('https://api.site.ru/v1/projects/123456789/folders');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer qwerty123'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$html = curl_exec($ch);
curl_close($ch);