Apachai.ContextExtensions.HandleJson C# (CSharp) Method

HandleJson() public static method

public static HandleJson ( this response, string json ) : void
response this
json string
return void
        public static void HandleJson(this IHttpResponse response, string json)
        {
            if (string.IsNullOrEmpty (json)) {
                response.StatusCode = 404;
                response.End ();
            } else {
                RawServing (response, "application/json", 600, json);
            }
        }