Sending JSON object to the server via http GET

前端 未结 3 740
悲哀的现实
悲哀的现实 2020-12-19 20:18

I am looking for sending JSON object to the server via GET. Chris\'s answer on Post an Array of Objects via JSON to ASP.Net MVC3 works for the http POST but not for GET.

3条回答
  •  感动是毒
    2020-12-19 21:05

    Try changing method to public ActionResult Screenreport(HttpRequestMessage request)

    Then use below code to get JSON object.

    data = request.RequestUri.Query;
    data = HttpUtility.ParseQueryString(data).Get("request");

提交回复
热议问题