我是靠谱客的博主 柔弱烤鸡,这篇文章主要介绍接口传参形式,现在分享给大家,希望可以做个参考。

一,后端接受前端数据的几种形式

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-typeapplication/json。 ----[request payload]

5.post请求,content-typeapplication/json,且有部分参数放在url上。 ----[request payload]

二,注意事项

1.get请求传参只能是字符串,要想有指定数据类型,通常可以把get请求转换为post请求,content-typeapplication/x-www-form-urlencoded

最后

以上就是柔弱烤鸡最近收集整理的关于接口传参形式的全部内容,更多相关接口传参形式内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(95)

评论列表共有 0 条评论

立即
投稿
返回
顶部