refactoring event store communication to use a HTTP POST inside the app instead of calling CURL on the command line