Skip to content

Commit 8bf71ce

Browse files
authored
[DOCS] document Content-Type breaking change from 8.0 (#116845) (#117057)
(cherry picked from commit fc987d8)
1 parent f1376de commit 8bf71ce

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/reference/migration/migrate_8_0/rest-api-changes.asciidoc

+17
Original file line numberDiff line numberDiff line change
@@ -1136,3 +1136,20 @@ for both cases.
11361136
*Impact* +
11371137
To detect a server timeout, check the `timed_out` field of the JSON response.
11381138
====
1139+
1140+
.The `Content-Type` response header no longer specifies the charset.
1141+
[%collapsible]
1142+
====
1143+
*Details* +
1144+
The `Content-Type` response header no longer specifies the charset. This information is not required when transferring JSON data, because JSON text will always be encoded in Unicode, with UTF-8 being the default encoding.
1145+
1146+
*Impact* +
1147+
Some applications and utilities, such as PowerShell's https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod[Invoke-RestMethod], must receive charset information to display data correctly. If your application or utility relies on charset information in the `Content-Type` response header, UTF-8 encoded characters will be rendered incorrectly in the response body.
1148+
1149+
As a workaround, to render non-ASCII characters, include an HTTP `Accept` header in your requests, specifying the charset:
1150+
1151+
[source,sh]
1152+
----
1153+
Accept: application/json; charset=utf-8
1154+
----
1155+
====

0 commit comments

Comments
 (0)