I have this: curl -H "Content-Type: application/json" -X POST -d '{"user":{"email":"mail@example.com","password":"secret"}}' -i https://url.com PHP: Mandatory header for any request is Content-Type: application/json. I need to use simple php code instead of command line. How can I do that?
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'SOME HEADER', 'APPTYPE:JSON' )); PHP: Just use curl_setopt