解決請求中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