RestAPI: Add explicit error when PUT mapping API is given an empty request body.

closes #7536
closes #7618