Beispiel #1
0
 public JsonResult Get(string value)
 {
     using (HttpPostTimer hpt = new HttpPostTimer())
     {
         TestResponse t = new TestResponse();
         t.name  = "testResponse";
         t.value = value;
         return(new JsonResult(t));
     }
 }
Beispiel #2
0
 public JsonResult Post([FromBody] TestRequest content)
 {
     using (HttpPostTimer hpt = new HttpPostTimer())
     {
         TestResponse t = new TestResponse();
         t.name = "testResponse";
         if (content != null)
         {
             t.value = content.name;
         }
         else
         {
             t.value = string.Empty;
         }
         return(new JsonResult(t));
     }
 }