created JSON request handler server side