这是人的结果:
{
"_embedded": {
"persons": [
{
"name": "Şükrü",
"phoneNumber": "5554443322",
"_links": {
"self": {
"href": "http://127.0.0.1:8080/api/persons/1"
},
"person": {
"href": "http://127.0.0.1:8080/api/persons/1"
},
"followers": {
"href": "http://127.0.0.1:8080/api/persons/1/followers"
},
"managedGroupList": {
"href": "http://127.0.0.1:8080/api/persons/1/managedGroupList"
},
"following": {
"href": "http://127.0.0.1:8080/api/persons/1/following"
},
"afilliatedGroupList": {
"href": "http://127.0.0.1:8080/api/persons/1/afilliatedGroupList"
}
}
},
{
"name": "Kerem",
"phoneNumber": "5435554433",
"_links": {
"self": {
"href": "http://127.0.0.1:8080/api/persons/2"
},
"person": {
"href": "http://127.0.0.1:8080/api/persons/2"
},
"followers": {
"href": "http://127.0.0.1:8080/api/persons/2/followers"
},
"managedGroupList": {
"href": "http://127.0.0.1:8080/api/persons/2/managedGroupList"
},
"following": {
"href": "http://127.0.0.1:8080/api/persons/2/following"
},
"afilliatedGroupList": {
"href": "http://127.0.0.1:8080/api/persons/2/afilliatedGroupList"
}
}
}
]
},
"_links": {
"self": {
"href": "http://127.0.0.1:8080/api/persons"
},
"profile": {
"href": "http://127.0.0.1:8080/api/profile/persons"
}
}
}
我正在尝试将人 2(Kerem)添加到组 1 的 adminList 中。
{
"_embedded": {
"persons": []
},
"_links": {
"self": {
"href": "http://127.0.0.1:8080/api/groups/1/adminList"
}
}
}
我试图将下面的人发布到“http://127.0.0.1:8080/api/groups/1/adminList”地址。
{
"person" : "http://127.0.0.1:8080/api/persons/2"
}
我得到了“204 No Content”结果,并且人员没有添加到 adminList。
如何使用链接将人员 2 添加到 adminList 中?