private void LogResponse(HttpResponse responseinfo, string TraceIdentifier = null)
        {
            //response.Body.Seek(0, SeekOrigin.Begin);
            // string text = await new StreamReader(response.Body).ReadToEndAsync();
            // response.Body.Seek(0, SeekOrigin.Begin);
            // var header = response.Headers.ToList().ToJSON();

            var response = LogHttpResponse.ToLogHttpResponse(responseinfo, TraceIdentifier);

            _logger.LogInformation(message: "{@response} registered", args: response);
        }
        public static LogHttpResponse ToLogHttpResponse(HttpResponse response, string TraceIdentifier = null)
        {
            var logg = new LogHttpResponse
            {
                Headers         = response.Headers.ToList(),
                ContentLength   = response.ContentLength,
                ContentType     = response.ContentType,
                StatusCode      = response.StatusCode,
                TraceIdentifier = TraceIdentifier
            };

            return(logg);
        }