-
Notifications
You must be signed in to change notification settings - Fork 387
Closed
Description
When making an HTTP POST, the lists are loosing the order. This is the case:
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class MatchClient {
final String baseUrl;
final http.Client httpClient;
MatchClient({
http.Client httpClient,
this.baseUrl = 'http://192.168.1.1:8080/match',
}) : this.httpClient = httpClient ?? http.Client();
Future<QuarterResult> compute(QuarterMatch quarterMatch) async {
// At this point, the order is maintained
final body = jsonEncode(quarterMatch);
// When I make the post, the list inside the object, loose the order
final response = await httpClient.post(
Uri.http(baseUrl, '/match'),
headers: {
'Content-Type': 'application/json',
},
body: body);
// In the browser the http request is shooted with a disordered list
final dynamic results = json.decode(response.body);
}
}
Issue solved, server issue
Metadata
Metadata
Assignees
Labels
No labels