Server implemented. Some gotcha on writing the output to the response.