I have to do a curl request to an API using PHP for my website.
My curl request =
curl -H "Content-Type: application/json" -H "Accept: application/json" -X GET -basic -u app:app "http://thewebsite.com"
My question is : How to translate -H options of this request in curl_exec() function in PHP ?
I have seen differents options like 'curl_setopt' but I don't know what is the correct option to use.
So to recap, which option for "Content-Type: application/json Accept: application/json" and for "-basic -u app:app" ?
Thanks :)
Flo