public JsonResult Get(string value) { using (HttpPostTimer hpt = new HttpPostTimer()) { TestResponse t = new TestResponse(); t.name = "testResponse"; t.value = value; return(new JsonResult(t)); } }
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)); } }