hopfenspace / MateBot

Micro service providing an API for MateBot clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add some new (optional) API header fields

CrsiX opened this issue · comments

commented

After a successful POST request, the HTTP return code should be 201, with the Location and Content-Location headers set accordingly.

For example, if one performs a POST /users request, the answer should be a JSON string containing the newly created User model. The header fields Location and Content-Location should be set in such a way, that GET <path> returns the exactly same result as the response, where path is something like /users/{id} in this case.

Make sure that this even works across API version boundaries.

commented

The response code 201 for newly created objects has been implemented. But the additional headers aren't used in any current client implementation and may never be, since retrieving the object via some GET endpoint is useless when it was already received as response to the POST request.
Therefore, this issue will be closed.