Add the main post request handler and tests.