You could have one method to factorize postPost and putPost and call it in both controllers; this would avoid duplicated code.