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); } }