s

Introduction

asp .net core mvc exception 415 unsupported media type edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 06 November 2020 | 2727

asp .net core MVC returns error HTTP/1.1 415 Unsupported Media Type while making a post request to api using fiddler.

HTTP/1.1 415 Unsupported Media Type

93 {"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"|895ff2e7-49320ad40cd2e054."} 0

Solution

While Making the post request the header should have


Accept: application/json
Content-Type: application/json