You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In controller I am trying to return HTTP request string, Can some one help on this?
public class TestController : ApiController
{
public string Get()
{
//var sr = new StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd();
//new System.IO.StreamReader(Request.Body).ReadToEnd()
//String Sd = sr;
//return Sd;
var httpContext = (HttpContextWrapper)Request.Properties["MS_HttpContext"];
var foo = httpContext.Request.Form["jsonRequest"];
return foo; //This is value passed in request
}
}
The text was updated successfully, but these errors were encountered:
In controller I am trying to return HTTP request string, Can some one help on this?
public class TestController : ApiController
{
public string Get()
{
//var sr = new StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd();
//new System.IO.StreamReader(Request.Body).ReadToEnd()
//String Sd = sr;
//return Sd;
var httpContext = (HttpContextWrapper)Request.Properties["MS_HttpContext"];
var foo = httpContext.Request.Form["jsonRequest"];
return foo; //This is value passed in request
}
}
The text was updated successfully, but these errors were encountered: