restrict most POST and PUT endpoints to json content-type

This commit also adds a separate method `form_put` for endpoints that do
not require json payload
Remove unused parameter
form_post for build_pack upload endpoints