server handles POST requests, response working