dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.54k stars 25.3k forks source link

Polymorphic model binding requires FormData #22959

Open stevenbey opened 3 years ago

stevenbey commented 3 years ago

Under the section 'Polymorphic model binding' it would be extremely helpful if it stated that the Request Content-Type header must be multipart/form-data or application/x-www-form-urlencoded. I wasted a considerable amount of time trying to figure out why it wasn't working for application/json.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Rick-Anderson commented 1 year ago

@halter73 should I add this?