Use setPostData in post action.
Make API router errors less ambiguous. Fix #558