Exemple #1
0
 public static JToken ParseBody(HttpRequest request)
 {
     try
     {
         return(JToken.Parse(RestUtils.ReadBody(request)));
     }
     catch
     { }
     return(null);
 }
Exemple #2
0
 public static void Push(HttpResponse response, JsonOpStatus status, JToken data)
 {
     if (data != null)
     {
         Push(response, RestUtils.JsonOpStatus(status, data.ToString()));
     }
     else
     {
         Push(response, RestUtils.JsonOpStatus(status));
     }
 }
Exemple #3
0
 public static void Push(HttpResponse response, JsonOpStatus status)
 {
     Push(response, RestUtils.JsonOpStatus(status));
 }
Exemple #4
0
 public static void Push(HttpResponse response)
 {
     Push(response, RestUtils.JsonOpStatus(Rest.JsonOpStatus.Ok));
 }