Closed eronekogin closed 3 years ago
the http response status code is always 200, and has code 200, 201, 400, etc. in response body, which is not typical REST style, can you list the points that you think is essential for REST API design?
the http response status code is always 200, and has code 200, 201, 400, etc. in response body, which is not typical REST style, can you list the points that you think is essential for REST API design?
{
"error": "Error message text"
}
For the server returning values when the action is success:
GET /collection: Return an array of resource objects.
GET /collection/resource: Return the single resource object.
POST /collection: Return the created resource object.
PUT /collection/resource: Return the updated resource object.
DELETE /collection/resource: Return an empty object.
It is also suggested to follow HATEOAS style when creating a restful api.
The server response should usually be in json format.
Thanks all, that's good enough for our evaluation, I'm gonna close this PR.
@eronekogin We will reach out to you soon.
The restful API provides general functions as follows:
Has a global logging mechanism which records every network access requests together with application internal events.
This application is created and unit tested by Ian Jiang (mengyu.jiang@gmail.com).