阅读请求正文时获取或POST [英] GET or POST when reading request body

查看:110
本文介绍了阅读请求正文时获取或POST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在向HTTP请求正文中的服务器发送信息时,我应该使用GET还是POST方法?没有查询参数附加到URL中,服务器将检查请求的正文以获取所需内容。

a href =http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3 =nofollow> GET 从请求URL中提取参数。 POST 从请求主体提取参数。

所以你需要POST。


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.

解决方案

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

So you need POST.

这篇关于阅读请求正文时获取或POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆