Answer the question
In order to leave comments, you need to log in
How to make a smooth transition between desktops in windows 10?
How to make a smooth transition between desktops in windows 10? The key word here is "smooth".
Answer the question
In order to leave comments, you need to log in
Depends on needs.
Pagination through headers is a so-so solution IMHO.
See how jsonapi.org or www.odata.org is made for inspiration.
HAL , Siren , JSON-LD (the last one is more hardcore, not the fact that it will suit you).
hello brother, I always do the same and I think it’s stupid to first send the code 200 (everything is OK), and then write {status: "everything is OK"} in the response,
on the other hand, there are a lot of narrow-minded developers who do not know how to work with headers - and if you have some kind of mass service for morons, then maybe they need to duplicate the information in the body, but I don’t understand how you duplicate the information for them in the answer if, for example, the server fell, or it issued 404 there.
although I am for the purity of the api, so that there is no service information in the response, all service information should be transmitted in the headers.
On the other hand, the API should be clear and obvious without documentation, so it's better to pass not just an array, but named data.
Example:
request get http://user/1
answer {name: "Vasya", age: 18}, not {["Vasya", "18"]}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question