From b5b85d47bc205c00708c691277e555ab21acf5e8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 15:40:43 +0800 Subject: [PATCH] Correct browser content negotiation formatter selection documentation (#1) * Initial plan * Update browser content negotiation documentation in formatting.md - Correct documentation to reflect that the framework selects the first registered output formatter - Update all three moniker ranges (aspnetcore-6.0, aspnetcore-7.0, and earlier versions) - Update metadata with ai-usage tag and current date Co-authored-by: HenryZhang-ZHY <62298214+HenryZhang-ZHY@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: HenryZhang-ZHY <62298214+HenryZhang-ZHY@users.noreply.github.com> --- aspnetcore/web-api/advanced/formatting.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aspnetcore/web-api/advanced/formatting.md b/aspnetcore/web-api/advanced/formatting.md index 23a78a686c99..61c470b7d3e7 100644 --- a/aspnetcore/web-api/advanced/formatting.md +++ b/aspnetcore/web-api/advanced/formatting.md @@ -1,11 +1,12 @@ --- title: Format response data in ASP.NET Core Web API +ai-usage: ai-assisted author: tdykstra description: Learn how to format response data in ASP.NET Core Web API. monikerRange: '>= aspnetcore-3.1' ms.author: tdykstra ms.custom: H1Hack27Feb2017 -ms.date: 04/08/2022 +ms.date: 01/07/2026 uid: web-api/advanced/formatting --- # Format response data in ASP.NET Core Web API @@ -97,7 +98,7 @@ If the Accept header contains `*/*`, the Header is ignored unless `RespectBrowse Unlike typical API clients, web browsers supply `Accept` headers. Web browsers specify many formats, including wildcards. By default, when the framework detects that the request is coming from a browser: * The `Accept` header is ignored. -* The content is returned in JSON, unless otherwise configured. +* The content is returned using the first registered output formatter that can handle the response type, unless otherwise configured. This approach provides a more consistent experience across browsers when consuming APIs. @@ -294,7 +295,7 @@ If the Accept header contains `*/*`, the Header is ignored unless `RespectBrowse Unlike typical API clients, web browsers supply `Accept` headers. Web browsers specify many formats, including wildcards. By default, when the framework detects that the request is coming from a browser: * The `Accept` header is ignored. -* The content is returned in JSON, unless otherwise configured. +* The content is returned using the first registered output formatter that can handle the response type, unless otherwise configured. This approach provides a more consistent experience across browsers when consuming APIs. @@ -529,7 +530,7 @@ If the Accept header contains `*/*`, the Header is ignored unless `RespectBrowse Unlike typical API clients, web browsers supply `Accept` headers. Web browsers specify many formats, including wildcards. By default, when the framework detects that the request is coming from a browser: * The `Accept` header is ignored. -* The content is returned in JSON, unless otherwise configured. +* The content is returned using the first registered output formatter that can handle the response type, unless otherwise configured. This approach provides a more consistent experience across browsers when consuming APIs.