解决请求中400的问题


具体报错:2019-03-19 12:01:35,097 - request - DEBUG - json_data: {'timestamp': 1552968086846, 'status': 400, 'error': 'Bad Request', 'exception': 'org.springframework.http.converter.HttpMessageNotReadableException', 'message': "JSON parse error: Unrecognized token 'halfSelectedKeys': was expecting ('true', 'false' or 'null'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'halfSelectedKeys': was expecting ('true', 'false' or 'null')\n at [Source: java.io.PushbackInputStream@6616c7bd; line: 1, column: 18]", 'path': '/v1/oms/role'} 

大概的意思是headers=headers的格式有问题

先看一下:requests.post(url, data=None, json=None, **kwargs))所需要的参数吧,

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM