예제 #1
0
        /// <summary>
        /// Sets the Server-Timing trailer header value.
        /// </summary>
        /// <param name="response">The response.</param>
        /// <param name="metrics">The metrics.</param>
        public static void SetServerTimingTrailer(this HttpResponse response, params ServerTimingMetric[] metrics)
        {
            ServerTimingHeaderValue serverTiming = new ServerTimingHeaderValue(metrics);

            response.AppendTrailer(HeaderNames.ServerTiming, serverTiming.ToString());
        }
예제 #2
0
 /// <summary>
 /// Sets the Server-Timing trailer header value.
 /// </summary>
 /// <param name="response">The response.</param>
 /// <param name="serverTiming">The Server-Timing header value.</param>
 public static void SetServerTimingTrailer(this HttpResponse response, ServerTimingHeaderValue serverTiming)
 {
     response.AppendTrailer(HeaderNames.ServerTiming, serverTiming?.ToString());
 }