I am doing this through bash:
curl -X POST myapp.dev/api/v1/clients -H "Content-Type:application/json" -d '{"name":"Client","contact":{"email":"test@gmail.com"}}' -H "X-Ninja-Token: SDFsdfsd4s5d445fs4d55sd54f4s5" -H "X-Requested-With: XMLHttpRequest"
and it works fine, but I want to do the same through php with curl. How this curl fuction should look like in php? I actually tried lots of variants, but I did not get the right result so far.