move getInt, getString, etc from API servlet to BaseServlet