fixed put/post

HTTP 400 error if POST or PUT request has no query