网络请求不成功原因总结

1.url 路径不对

不要只看控制台打印,先看Network中的Headers中的General查看路径(网址中不要多空格及其他字符)

 

2.参数不对

2.1形参名称/大小写不正确

请求参数在Network中的Headers中的Request Payload查看

2.2参数数量不对

2.3参数类型不匹配

 

3.请求方式

get  post put delete

 

4.Content-type

application/json

application/x-www-form-urlencoded

注意:"content-type":content-type?content-type:'application/json'

posted @ 2022-11-29 18:38  江枫0235  阅读(498)  评论(1)    收藏  举报