解决请求中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') at [Source: java.io.PushbackInputStream@6616c7bd; line: 1, column: 18]", 'path': '/v1/oms/role'} 

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

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

原文地址:https://www.cnblogs.com/insane-Mr-Li/p/10558382.html