protected override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            IEnumerable <string> requestHeaders;
            var checkApiKeyExists = request.Headers.TryGetValues("apikey", out requestHeaders);

            if (!checkApiKeyExists)
            {
                return(SendError("You can't use the API without the key.", HttpStatusCode.Forbidden));
            }
            else
            {
                var apikey     = requestHeaders.FirstOrDefault();
                var apiRequest = new WebApiUsageRequest(request, apikey);
                request.Content.ReadAsStringAsync().ContinueWith(t =>
                {
                    apiRequest.Content = t.Result;
                    _repo.Add(apiRequest);
                }, cancellationToken);

                // ************ No Need to capture out Respose  ********************

                //return base.SendAsync(request, cancellationToken).ContinueWith(
                //    task =>
                //    {
                //        var apiResponse = new WebApiUsageResponse(task.Result, apikey);
                //        apiResponse.Content = task.Result.Content.ReadAsStringAsync().Result;
                //        _repo.Add(apiResponse);
                //        return task.Result;
                //    }, cancellationToken);


                return(base.SendAsync(request, cancellationToken));
            }
        }
        protected override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            string apikey = HttpUtility.ParseQueryString(request.RequestUri.Query).Get("apikey");

            var apiRequest = new WebApiUsageRequest(request, apikey);

            request.Content.ReadAsStringAsync().ContinueWith(t =>
            {
                apiRequest.Content = t.Result;
                _repo.Add(apiRequest);
            });

            return(base.SendAsync(request, cancellationToken).ContinueWith(
                       task =>
            {
                var apiResponse = new WebApiUsageResponse(task.Result, apikey);
                apiResponse.Content = task.Result.Content.ReadAsStringAsync().Result;
                _repo.Add(apiResponse);
                return task.Result;
            }
                       ));
        }