1
article_url = "https://api.airtable.com/v0/appxxxxxxxxxxx/articles/row_id?api_key=APIKEY"
data = {"fields" : {"contacted" : "hello world"}, "typecast":True}
patch_article_data = requests.patch(article_url, data=data)

我不明白为什么上述方法对补丁请求不起作用。我尝试了很多变体,包括没有类型转换。我得到以下回应。

{u'error': {u'message': u'Invalid request: parameter validation failed. Check your request data.', u'type': u'INVALID_REQUEST_UNKNOWN'}}
4

1 回答 1

1

I think that the problem is linked with the way you are sending the payload, instead of sending it like a string I would recommend you try sending it as a JSON string by replacing:

patch_article_data = requests.patch(article_url, data=data)

with

patch_article_data = requests.patch(article_url, json=data)
于 2019-11-11T21:30:32.270 回答