$ curl -u user:password -H "Content-Type: multipart/form-data" -H "Accept: application/json" -H "Expect:" -F file=@test.txt -X POST http://127.0.0.1:8000/upload/ | jq '.' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 455 100 249 100 206 2547 2107 --:--:-- --:--:-- --:--:-- 2567 { "url": "http://127.0.0.1:8000/snippets/2/", "id": 2, "highlight": "http://127.0.0.1:8000/snippets/2/highlight/", "owner": "user", "title": "Default Title", "code": "Test POST file Perl", "linenos": false, "language": "perl", "style": "emacs" }