I just discovered a small problem coming from HttpClient, when I try to fetch data from my api:
constructor(private http: HttpClient) {}
ngOnInit(): void {
this.http.get("http://localhost:8080/api/test/test?status=None").subscribe((data)=>{
console.log(data);
})}
It seems to order the json field in alphabetic order. Here is the result from Postman:
"total": {
"error": 321,
"run": 338,
"desc": 1000
}
And here is from Angular HttpClient:
total: {
desc: 321,
error: 1000,
run: 338
}
Did someone have the same issue or just a tip to force HttpClient to not alphabetically order the field?