Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In ASP.NET Web API, I am getting this Message no http resource was found that matches the request uri #39

Open
Sekharuggina opened this issue May 7, 2021 · 0 comments

Comments

@Sekharuggina
Copy link

Sekharuggina commented May 7, 2021

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
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant