javascript - Ajax requests background data through the interface. When to use put, get, and post? Please give advice.
滿天的星座
滿天的星座 2017-05-19 10:25:20
0
7
500

ajax requests background data through the interface. Please give advice on when to use put, get, and post.

滿天的星座
滿天的星座

reply all(7)
淡淡烟草味

get Get
post New
put Update
For more information, please Baidu "http verb"

phpcn_u1582

Obviously, you can guess the meaning just by looking at the English words... As mentioned above, post is generally used to submit information, and get gets...

漂亮男人

The commonly used methods are get for querying and post for data modification (add, delete, modify)

刘奇

I think you can clearly distinguish the advantages and disadvantages between the three, and then it depends on the situation. There is no special rule on when to use which one

漂亮男人

This depends on whether the RESTful service is used. If not, generally only get and post submissions are required. If you use REST, there will be get, post, put, and delete. get: obtain data operation; post: create data operation; put: update data operation; delete: delete data operation; in fact, there are also head, options, trace, and connect methods; there are eight methods in total

仅有的幸福

I think what kind of interface is given to you by the backend? It wants to give you an interface for getting parameters. Can you use post to submit? The backend says that this interface is accessed using get, and what are the parameters? Then you just use get access and bring the parameters! What's the use of worrying about it?

阿神

get acquisition, only short parameters and can be used in clear text, can be used when there are no restrictions in the background; post parameters are relatively long, or do not require clear text transmission, such as passwords, etc., can be used without restrictions in the background;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template