20 lines
412 B
C#
20 lines
412 B
C#
|
using ln.json;
|
||
|
|
||
|
namespace ln.http.api
|
||
|
{
|
||
|
|
||
|
public static class HttpResponseExtensions
|
||
|
{
|
||
|
|
||
|
public static HttpResponse Content(this HttpResponse response, JSONValue json)
|
||
|
{
|
||
|
response.SetHeader("Content-type", "application/json");
|
||
|
response.ContentWriter.Write(json.ToString());
|
||
|
response.ContentWriter.Flush();
|
||
|
return response;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|