Answer the question
In order to leave comments, you need to log in
How to choose a protocol for an API?
The frontend of the application communicates with the backend. The format is JSON only. As you develop more and more methods and "ends" and the zoo grows:
response
, an error if it occurs - in the field error
(then it response
is absent).Answer the question
In order to leave comments, you need to log in
First, unify the output format. You can stop only at json, or just specify the output format in the parameters - json/txt/html/xml. For json, you will need to describe and document the fields of the returned object. Whether other output formats are needed - look locally. txt can be handy for API testing and debugging.
If the project is supposed to exist for a long time, you need to add a field to the json - the "version" of the API
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question