Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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));
     }
 }