IMPORTANT
This is not necessarily a bug. Primarily I am just trying to gather some additional information about different behaviour of AngularJs ($http) and Angular (HttpClient) APIs.
Please note that I've asked the same question on SO and Gitter but haven't received any answers so I decided to ask it there:
In AngularJs the default Content-type for JSON request is set like:
Content-Type: application/json; charset=UTF-8
This is the part of the AngularJs code that does it:
http.js
... and this is the commit in which charset=UTF-8 parameter was added:
angular/angular.js@10f80d7
Now in the case of Angular only
Content-Type: application/json
is used:
xhr_backend.ts
Side note:
We've noticed this when migrating from AngularJs ($http) to Angular (HttpClient).
Does anyone know why this difference?
IMPORTANT
This is not necessarily a bug. Primarily I am just trying to gather some additional information about different behaviour of AngularJs (
$http) and Angular (HttpClient) APIs.Please note that I've asked the same question on SO and Gitter but haven't received any answers so I decided to ask it there:
In AngularJs the default
Content-typeforJSONrequest is set like:Content-Type: application/json; charset=UTF-8This is the part of the AngularJs code that does it:
http.js
... and this is the commit in which
charset=UTF-8parameter was added:angular/angular.js@10f80d7
Now in the case of Angular only
Content-Type: application/jsonis used:
xhr_backend.ts
Side note:
We've noticed this when migrating from AngularJs (
$http) to Angular (HttpClient).Does anyone know why this difference?