如何读取原始http post字符串。我已经找到了几个读取文章解析版本的解决方案,但是我正在处理的项目提交了一个原始的xml有效负载,而没有头文件。因此,我试图找到一种方法来读取post数据,而不必将其解析为键=>值数组。
发布于 2013-07-26 18:33:40
我认为self.rfile.read(self.headers.getheader('content-length'))应该以字符串的形式返回原始数据。根据直接在BaseHTTPRequestHandler类中的文档:
- rfile is a file object open for reading positioned at the
start of the optional input data part;发布于 2019-09-12 06:40:46
https://stackoverflow.com/questions/17888504
复制相似问题