pgt*_*ips 1 php string rest json
我正在使用REST API将属性POST到使用json的人。我的请求正文如下所示:
$requestBody = '
{
"attribute": {
"@id": "",
"@uri": "",
"person": {
"@id": "222",
"@uri": "https://api_name_removed.com/v1/People/222"
},
"attributeGroup": {
"@id": "",
"@uri": "",
"name": null,
"attribute": {
"@id": "2404",
"@uri": "",
"name": null
}
},
"lastUpdatedDate": null
}
}';
Run Code Online (Sandbox Code Playgroud)
如何将人员ID,人员uri和属性ID更改为已经存储的变量?
$requestBody = '
{
"attribute": {
"@id": "' . $id . '",
"@uri": "' . $uri . '",
"person": {
"@id": "222",
"@uri": "https://api_name_removed.com/v1/People/222"
},
"attributeGroup": {
"@id": "",
"@uri": "",
"name": null,
"attribute": {
"@id": "2404",
"@uri": "",
"name": null
}
},
"lastUpdatedDate": null
}
}';
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3711 次 |
| 最近记录: |