ln.http.api/ln.http.api/HttpResponseExtensions.cs

20 lines
398 B
C#
Raw Normal View History

2020-12-05 23:07:18 +01:00
using ln.json;
namespace ln.http.api
{
public static class HttpResponseExtensions
{
public static HttpResponse Content(this HttpResponse response, JSONValue json)
{
2020-12-28 08:45:24 +01:00
response.ContentType("application/json");
2020-12-05 23:07:18 +01:00
response.ContentWriter.Write(json.ToString());
response.ContentWriter.Flush();
return response;
}
}
}