关于[Returning HTTP 204 (No Content) from .NET Minimal API ]的摘要:
I recently converted some ASP.NET web api projects from using controllers to using minimal apis. And I ran into a weirdness. If you return "null" from a controller method, then the response is HTTP 204 (No Content), but if you return "null" from a minimal api, the response is HTTP 200 (OK) with the string "null" as the body.
原文地址: https://jeremybytes.blogspot.com/2022/04/returning-http-204-no-content-from-net.html