📜  Flutter 将 json 正文发送到 api - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:07.709000             🧑  作者: Mango

代码示例2
final queryParameters = {
  'name': 'Bob',
  'age': '87',
};
final uri = Uri.http('www.example.com', '/path', queryParameters);
final headers = {HttpHeaders.contentTypeHeader: 'application/json'};
final response = await http.get(uri, headers: headers);