Is this still the case?我们可以不使用Flutter查询FileMaker API吗?
我收到一个400错误。
这是我的代码:

final recordResponse = await http.post(
  findUrl,
  headers: {
    HttpHeaders.contentTypeHeader: 'application/json',
    HttpHeaders.authorizationHeader : 'Bearer ' + token
  },
  body: json.encode({"query":[{"firstname": "=Yuichi"}]}),
);

最佳答案

解决了。
我可以使用Dio在FileMaker布局中访问一个用户。

Dio dio = Dio();

dio.options.headers['content-Type'] = 'application/json';
dio.options.headers["authorization"] = "Bearer ${token}";

 Response recordResponse;

 recordResponse = await dio.post(
   findUrl,
   options: Options(followRedirects: false, validateStatus: (status)
 {return status < 500;}),
    data: { "query":
      [{
          "username": "=Jake",
          "password": "=password"
      }]
    }
  );

10-08 20:10