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 Master
without Detail
does not make sense. There may be times when this is not the case, but in the case of the forum a, Thread
at 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 POST
at.
source
share