I'am trying build a PHP call to my first API and the example request shown in the docs, tell me to make this request with curl but I'am not having much success. I've tried to follow other answers (i.e. CURL php query formation - how to? ) and know i'am doing something wrong but can't seem to figure it out?
Any help would be greatly appreciated.
The initial request must be authorized with HTTP Basic authorization.
POST /api/shrink HTTP/1.1
Host: api.site.org
Authorization: Basic YXsdflasdkfjalsdjfojiosslkjdZdXZ3eHl6MDEyMzQ1
curl -i --user api:api_key --data-binary @test.png http://api.site.org
This should return a json string that includes a url to an image file.