Flutter请求Filemaker API(FieldData) [英] Flutter request Filemaker API (FieldData)

查看:140
本文介绍了Flutter请求Filemaker API(FieldData)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问文件制作器API的一个特定调用,我有几个正在运行的请求..
,但是如果我尝试对fieldData字段执行一个操作则不起作用

Im trying to access one specific call to the filemaker API, I have several requests which are working.. but if i try to do one with the fieldData field it doesn't work

var body = {"fieldData": {
  "testId": myId
}};

  HttpClient httpClient = new HttpClient();
  HttpClientRequest request = await httpClient.postUrl(Uri.parse(url));
  request.headers.set('content-type', 'application/json');
  request.headers.add('authorization', 'bearer $token');
  request.add(utf8.encode(json.encode(body)));
  HttpClientResponse httpClientResponse = await request.close();
  String reply = await httpClientResponse.transform(utf8.decoder).join();
  httpClient.close();

我只是收到错误:

{"messages":[{"message":"Unknown parameter(s): fieldData","code":"960"}],"response":{}}

编辑:
网址:https:// {Server} / fmi / data / vLatest / databases / {database} / layouts / DataAPIaddresses / records / {id}

Url: https://{Server}/fmi/data/vLatest/databases/{database}/layouts/DataAPIaddresses/records/{id}

推荐答案

找到了它:

HttpClientRequest request = await httpClient.patchUrl(Uri.parse(url));

您必须patchUrl,因为Filemaker想要一个补丁请求...

You have to patchUrl, because Filemaker wants a Patch request...

这篇关于Flutter请求Filemaker API(FieldData)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆