protected String getApiKey(HttpServletRequest request, QueryMap queryParams) {
        String apiKey = request.getHeader("X-API-Key"); //$NON-NLS-1$
        if (apiKey == null || apiKey.trim().length() == 0) {
            apiKey = queryParams.get("apikey"); //$NON-NLS-1$
        }
        return apiKey;
    }
Gets the API Key from the request.  The API key can be passed either via
a custom http request header called X-API-Key or else by a query parameter
in the URL called apikey.
@param request the inbound request
@param queryParams the inbound request query params
@return the api key or null if not found
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/GatewayServlet.java