84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
自己做了个小网站接了第三方服务,第三方服务会POST一个JSON过来参与签名加密,我必须获取第三方POST过来的JOSN的原始数据才能正确效验。
现在是用Flask的request.get_json()去拿JSON数据,拿是可以拿到,但是拿到的数据已经不是原始数据了,被重新排序,键值对还加了空格,这样就不是原始的JSON了,加密效验也就无法完成。
请求大神指点如何拿到原始的JSON数据。当然,要基于Flask 的route。
闭关修行中......
> request.data
Contains the incoming request data as string in case it came with a mimetype Flask does not handle.
request.get_data()
request.get_data()