GET or POST when reading request body

狂风中的少年 提交于 2020-01-16 07:58:42

问题


Should I use the GET or POST method when sending information to a server in the body of the HTTP request? There are no query parameters appended to the URL, the server will inspect the body of the request for what it needs.


回答1:


GET extracts parameters from the request URL. POST extracts parameters from the request body.

So you need POST.




回答2:


A nice description and interesting discussion on the topic:

http://thinkvitamin.com/code/the-definitive-guide-to-get-vs-post/




回答3:


POST should be used if you are not planing on using the query string.



来源:https://stackoverflow.com/questions/6031136/get-or-post-when-reading-request-body

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!