📅  最后修改于: 2022-03-11 15:03:40.488000             🧑  作者: Mango
import 'package:http/http.dart' as http;
import 'dart:convert';
Map headers = {'Content-Type':'application/json','authorization':'Basic c3R1ZHlkb3RlOnN0dWR5ZG90ZTEyMw=='};
final msg = jsonEncode({"grant_type":"password","username":"******","password":"*****","scope":"offline_access"});
var response = await post(Urls.getToken,
headers: headers,
body: msg,
);