Article From:

In the design of the back-end interface, for example, in the front end separation, for example


codeThe value of 1 indicates whether the request is successful or should the code request fail? See several demo, all is to set 0 to succeed. How did you make it?

Answer 0:

I decided that the 0 set for success is mainly because the C function returns 0, which means successful execution. You can also set 200 as a success, just like HTTP status.

Answer 1:

It is best to follow the response status of HTTP to mark the status with 200400.…

Leave a Reply

Your email address will not be published. Required fields are marked *