Microsoft.AspNetCore.SignalR.ResponseExtensions.End C# (CSharp) Method

End() public static method

Set the entire response body to data. This method does not support writing to a response that has already been written to since it sets HttpResponse.ContentLength.
public static End ( this response, string data ) : System.Threading.Tasks.Task
response this
data string
return System.Threading.Tasks.Task
        public static Task End(this HttpResponse response, string data)
        {
            var bytes = Encoding.UTF8.GetBytes(data);
            response.ContentLength = bytes.Length;
            response.Body.Write(bytes, 0, bytes.Length);
            return response.Body.FlushAsync();
        }
    }
ResponseExtensions