TripleParity / docks-api

RESTful API Server for Docks
https://tripleparity.github.io/docks-api/stack-api-spec.html
GNU General Public License v3.0
0 stars 0 forks source link

Content Type Header not forwarded to Docker API #34

Closed egeldenhuys closed 6 years ago

egeldenhuys commented 6 years ago

Message

{"message":"Content-Type specified () must be 'application/json'"}

Steps to reproduce

sudo docker run --rm -it -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock tripleparity/docks-api:develop

curl --header "Content-Type: application/json" --request POST --data '{"name": "mahHeart"}' http://localhost:8080/docker/volumes/create

> {"message":"Content-Type specified () must be 'application/json'"}

Expected

sudo curl --unix-socket /var/run/docker.sock --header "Content-Type: application/json" --request POST --data '{"name": "mahSoul"}' http:/api/volumes/create

> {"CreatedAt":"2018-05-08T11:13:31+02:00","Driver":"local","Labels":null,"Mountpoint":"/var/lib/docker/volumes/shet/_data","Name":"mahSoul","Options":null,"Scope":"local"}
egeldenhuys commented 6 years ago

@devosray can you please look into this since you set up the initial proxy?

egeldenhuys commented 6 years ago

Closed by #35

egeldenhuys commented 6 years ago

Allows TripleParity/docks-ui#57 to continue