Skip to content

Commit 62d0d40

Browse files
authored
Merge pull request #36911 from dotnet/main
Merge to Live
2 parents 970e328 + 325c700 commit 62d0d40

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

aspnetcore/web-api/advanced/formatting.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: Format response data in ASP.NET Core Web API
3+
ai-usage: ai-assisted
34
author: tdykstra
45
description: Learn how to format response data in ASP.NET Core Web API.
56
monikerRange: '>= aspnetcore-3.1'
67
ms.author: tdykstra
78
ms.custom: H1Hack27Feb2017
8-
ms.date: 04/08/2022
9+
ms.date: 03/22/2026
910
uid: web-api/advanced/formatting
1011
---
1112
# Format response data in ASP.NET Core Web API
@@ -97,7 +98,7 @@ If the Accept header contains `*/*`, the Header is ignored unless `RespectBrowse
9798
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:
9899

99100
* The `Accept` header is ignored.
100-
* The content is returned in JSON, unless otherwise configured.
101+
* The content is returned using the first registered output formatter that can handle the response type, unless otherwise configured.
101102

102103
This approach provides a more consistent experience across browsers when consuming APIs.
103104

@@ -294,7 +295,7 @@ If the Accept header contains `*/*`, the Header is ignored unless `RespectBrowse
294295
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:
295296

296297
* The `Accept` header is ignored.
297-
* The content is returned in JSON, unless otherwise configured.
298+
* The content is returned using the first registered output formatter that can handle the response type, unless otherwise configured.
298299

299300
This approach provides a more consistent experience across browsers when consuming APIs.
300301

@@ -529,7 +530,7 @@ If the Accept header contains `*/*`, the Header is ignored unless `RespectBrowse
529530
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:
530531

531532
* The `Accept` header is ignored.
532-
* The content is returned in JSON, unless otherwise configured.
533+
* The content is returned using the first registered output formatter that can handle the response type, unless otherwise configured.
533534

534535
This approach provides a more consistent experience across browsers when consuming APIs.
535536

0 commit comments

Comments
 (0)