Skip to content

Commit

Permalink
create Send method wrapper for send string as buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed Nov 15, 2023
1 parent 7f954bd commit 1906fc8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/HTTP/Response.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
using System;
using System.Net;
using System.Text;
using System.Threading;
using Netly.Core;

namespace Netly
{
public class Response
Expand Down Expand Up @@ -29,5 +35,9 @@ public void Send(int statusCode, byte[] buffer)
});
}

public void Send(int statusCode, string buffer)
{
Send(statusCode, NE.GetBytes(buffer, NE.Mode.UTF8));
}
}
}

0 comments on commit 1906fc8

Please sign in to comment.