autodesk-forge - 对项目用户更新端点的补丁请求失败
问题描述
当我使用属性发出补丁请求https://developer.api.autodesk.com/hq/v2/accounts/:account_id/projects/:project_id/users/:user_id
并传递角色 ID 列表时,industry_roles
我得到以下响应:
{'code': 1001, 'message': 'users list about to be imported are empty or in wrong format.'}
有谁知道为什么会这样?
我在请求中传递的正文是:
{
"company_id": <my company id>,
"industry_roles": [
<role id>,
<role id>
]
}
解决方案
请确保数据作为带有标头的 JSON 传递content-type:application/json
。
推荐阅读
- mysql - 一般错误:1114 表 '/var/db/mysql_tmpdir/#sql3cac_5b34d_1' 已满 - Magento 2.4.2
- list - Flutter: Remove item for a list reflect another list
- reactjs - ReactJS 路由器未在 URL 中显示页面名称
- kotlin - 通用 JPA 转换器在运行时不知道类型
- node.js - 迁移到 webpack 5:无法读取未定义的属性“原型”
- r - R如何分隔基于字符串的空格但保留小数点?
- javascript - 在 Javascript 中将对象设置为 null 时是否会删除事件侦听器?
- haskell - Haskell中括号内的双点是什么意思?
- ios - Swift 5 中不显示导航栏
- spring - 保存 ThreadPoolExecutor 的所有排队任务