Read JSON post data in ASP.Net Core MVC
I've tried to find a solution for this, but all the ones coming up are for previous versions of ASP.Net. I'm working with the JWT authentication middleware and have the following method: private async Task GenerateToken(HttpContext context) { var username = context.Request.Form["username"]; var password = context.Request.Form["password"]; //Remainder of login code } This gets the sent data as if it was form data, but my Angular 2 front end is sending the data as JSON. login(username: string, password: string): Observable<boolean> { let headers = new Headers({ 'Content-Type': 'application/json'