/// <inheriteddoc cref="Owasp.Esapi.Interfaces.IHttpUtilities.LogHttpRequest(HttpRequest, ILogger, ICollection<string>)" /> public void LogHttpRequest(HttpRequest request, ILogger logger, ICollection <string> obfuscatedParams) { if (request == null) { throw new ArgumentNullException("request"); } if (logger == null) { throw new ArgumentNullException("logger"); } StringBuilder requestData = new StringBuilder(); // Write request data using (TextWriter dataWriter = new StringWriter(requestData)) { HttpRequestWriter writer = new HttpRequestWriter(dataWriter); writer.Write(request, Esapi.SecurityConfiguration.CurrentUser, obfuscatedParams, true); } // Log logger.Info(LogEventTypes.FUNCTIONALITY, requestData.ToString()); }
/// <inheriteddoc cref="Owasp.Esapi.Interfaces.IHttpUtilities.LogHttpRequest(HttpRequest, ILogger, ICollection<string>)" /> public void LogHttpRequest(HttpRequest request, ILogger logger, ICollection<string> obfuscatedParams) { if (request == null) { throw new ArgumentNullException("request"); } if (logger == null) { throw new ArgumentNullException("logger"); } StringBuilder requestData = new StringBuilder(); // Write request data using (TextWriter dataWriter = new StringWriter(requestData)) { HttpRequestWriter writer = new HttpRequestWriter(dataWriter); writer.Write(request, Esapi.SecurityConfiguration.CurrentUser, obfuscatedParams, true); } // Log logger.Info(LogEventTypes.FUNCTIONALITY, requestData.ToString()); }