writing purpose
1. Review + prevent forgetting
2. The new background likes to use the formdata in the post method to submit data, but we prefer the default json method, and its interface is compatible with it later
1. get submit
a. Only one id is required (the most common)
The front end defines the interface:
use:
b.id is spliced after the request address (common)
The back-end swagger is not up, and there is no picture. It is probably like this. The
front-end definition interface
is used
c. Need to splicing id, but also need to pass parameters (common)
The picture is probably like this
2. post submission
a. Just submit normal json data (the most common)
The front end defines the interface:
use:
b. Submitting a post needs to be submitted in formdata form format, which is not very common (mainly here, the front end needs to use formdata to submit when posting, which is very uncomfortable. I don’t want to write new Formdata when there is no file to upload, so it can be like this)
The front end defines the interface:
use:
3. put submit
a.id splicing, you also need to pass parameters (common):
The front end defines the interface:
use: