The difference between accept and content-type

 What is the difference between these two ways of writing? The simple and easy-to-understand popular explanation is:

Accept indicates the data format that the interface wants to return to the client.
Content-Type represents the data format sent by the client to the server. This is defined when writing the REST interface 

 

 Normally, if the server does not define Accept but adds it by itself, it will report 404 The corresponding interface is not found. There may also be garbled

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326802788&siteId=291194637
Recommended