CURL

NEW https://github.com/neolao/documentation/blob/master/curl.md

Uploader une image

curl -i -X POST -H "Content-Type: application/json" -d '{"email":"neolao@gmail.com","password":"coucou"}' http://localhost/api
curl -i -X POST -H "X-User-Id: 52b2c74f834d222a34000002" -H "X-Session-Token: 1fa24ea765881795564da2ac58d75a396e789cbd" -F 'avatar=@localfile.jpg' http://localhost/api

Récupérer le code HTTP

curl -s -o /dev/null -I -w "%{http_code}" http://website.com/