我正在尝试使用 Dio 库向 API 发出 POST 请求。
final authenticationRaw = '<GTSRequest command="version">'
' <Authorization account="XXXXXX" user="" password="XXXXX"/> '
'</GTSRequest>';
print(authenticationRaw);
// final autRequest = XmlDocument.parse(authenticationRaw);
print("help1");
try {
print("help2");
Dio dio = Dio();
print("helpcc");
Response response = await dio.post(
_baseUrl,
data: authenticationRaw,
options: Options(method: 'POST'),
);
print("help3");
我从来没有打印过 help3。
有人可以帮忙吗?
谢谢