/// <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()); }
/// <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()); }