Renamed example/config.cfg to example.cfg
You forgot importing json

- and also remove unused imported modules
Refactor some endpoint functions of post