consolidate put and post methods

pushed the put and post together for easier maintenance.
handled very similarly, small control logic in the POST method
to redirect to PUT if appropriate