Server.Request.SendResponse C# (CSharp) Méthode

SendResponse() public méthode

Send a response back to the client
public SendResponse ( string response, string type = "text/html" ) : void
response string
type string
Résultat void
        public void SendResponse(string response, string type = "text/html")
        {
            if (_client != null) {
                string header = "HTTP/1.0 200 OK\r\nContent-Type: " + type + "; charset=utf-8\r\nContent-Length: " + response.Length +
                                "\r\nConnection: close\r\n\r\n";

                Log.Debug("header");

                _client.Send(header);
                _client.Send(response);
            }
        }