update server.py for post handling