Flutter Filemaker API _find请求

问题描述 投票:0回答:1

我正在尝试通过Flutter向Filemaker发出http请求(package:http / http.dart)

我可以正常获得令牌,但是如果我尝试向Filemaker发出_find请求,则总是被拒绝(400 Bad Request),而没有任何消息。在邮递员中,我可以毫无问题地执行完全相同的请求!

var body = { "query":[{
  "loginName": "[email protected]"
}]};
Response response = await post(url,
         headers: {
           HttpHeaders.authorizationHeader: 'Bearer $token',
           HttpHeaders.contentTypeHeader: 'application/json'},
         body: json.encode(body));
flutter dart filemaker
1个回答
0
投票

找到了:Dart http添加:content-type:application / json; charset = utf-8

Filemaker拒绝了此。但是现在的问题是,为什么Filemaker API拒绝这样的API调用?

© www.soinside.com 2019 - 2024. All rights reserved.