I've managed to make it work by mimicing the properties of the HTTP PUT request that is done by curl -v -X PUT --data "version=X" "endpoint".