【http请求】required string parameter 'XXX'is not present 的几种情况 清疚 2021-08-19 23:03 262阅读 0赞 参考:[https://blog.csdn.net/qq\_40391559/article/details/82856868][https_blog.csdn.net_qq_40391559_article_details_82856868] 第一个可能,就是你的content-Type设置是否正确【有些服务器会限制传入的方式】 [Python requests.post方法中data与json参数区别][Python requests.post_data_json]:[https://www.cnblogs.com/yanlin-10/p/9820694.html][Python requests.post_data_json] headers = { 【二选一】根据你服务器的要求选择【浏览器是可以检测到的】 "content-Type": "application/json", "content-Type": "application/x-www-form-urlencoded", } **第二个可能:我上一次传入json参数的时候,中间有一个特殊的符号逗号,从浏览器复制的,导致不ok** **第三个可能:如果你设置"content-Type": "application/x-www-form-urlencoded",那么就必须采用json格式化字符串!** [https_blog.csdn.net_qq_40391559_article_details_82856868]: https://blog.csdn.net/qq_40391559/article/details/82856868 [Python requests.post_data_json]: https://www.cnblogs.com/yanlin-10/p/9820694.html
还没有评论,来说两句吧...