我在下面有一个家庭控制器方法,它是从 http post 请求调用的。我需要读取请求数据并将其发送到视图。有没有办法查看原始数据而不在 SaveResponse() 中创建参数?感谢您的任何建议。
public ActionResult SaveResponse()
{
//Read the http post request body as json and send it to view
//HttpContext.Request.RequestContext
return View("CallbackView");
}
请求正文将采用 JSON 格式。
{
"customers":
{
"firstName": "Test”,
"lastName": “Lastname”,
"fullAddress":
{
"streetAddress": "123 springs lane",
"city": "New York",
"state": "NY",
"postalCode": 10021
}
}
}
拉丁的传说
UYOU
随时随地看视频慕课网APP
相关分类