1, 2 REST. , Master + Detail.
Detail Master ( ), , Master Detail Master.
Detail .
GET /master/1 GET /master/1?detail=true.
POST PUT . "" Detail.
JSON:
{
"data": {
"name": "master",
"detail": [
{
"name": "detail1"
},
{
"name": "detail2"
}
]
}
}
A POST Master name "master" 2 Detail Master.
@ElroyFlynn, Detail Master, .
Thread POST s. a Thread Master, POST Detail. POST , ( - GET /post?max_age=1h).
And I do not agree that Masterwithout Detaildoes not make sense. There may be times when this is not the case, but in the case of the forum a, Threadat its discretion, does. For atomicity:
It depends on the case. If you delete User, you usually keep it POST(even here in StackOverflow). If you delete Thread, I think you can delete POSTat.
source
share