一,后端接受前端数据的几种形式
1.get请求,原始的参数放在url后面。---- [query string parameters]
2.get请求,接收parameters=‘{}’,公司特有的。---- [query string parameters]
3.post请求,content-type为默认值application/x-www-form-urlencoded。 ----[form data]
4.post 请求,content-type为application/json。 ----[request payload]
5.post请求,content-type为application/json,且有部分参数放在url上。 ----[request payload]
二,注意事项
1.get请求传参只能是字符串,要想有指定数据类型,通常可以把get请求转换为post请求,content-type为application/x-www-form-urlencoded。
最后
以上就是柔弱烤鸡最近收集整理的关于接口传参形式的全部内容,更多相关接口传参形式内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复