[Route("GetData")]
[HttpPost]
public virtual async
System.Threading.Tasks.Task<HttpResponseMessage> GetData()
{
string someData = await
Request.Content.ReadAsStringAsync();
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
return response;
}
The syntax is similar to the JS async await - http://deebujacob.blogspot.com/2018/02/here-is-simple-example-on-how-to-use.html
No comments:
Post a Comment