你的位置: 码友网首页 / 资讯源列表 / Returning HTTP 204 (No Content) from .NET Minimal API

关于[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

收录时间: 2022-04-15 浏览量: 1615 分类: .NET 6

| 0 收藏 | 0