TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

[Python and HTTP] How many data compress methods at HTTP POST body?

1 点作者 kingname超过 7 年前
I have captured a http package of an App by Charles, the headers and body of this package is:<p>```<p><pre><code> POST &#x2F;v1&#x2F;user&#x2F;message&#x2F;history?fr=544504935 HTTP&#x2F;1.1 X-LV: 1 X-KV: cf6ccedf X-SIGN: J8bMq6EIw7hTZzaekDiIE40Jy+s= Connection: Keep-Alive Charset: UTF-8 Expect: 100-continue cookie: SESSIONID=30BB3E48-C110-CF95-BBF7-C5B948672125 Accept-Language: zh-CN User-Agent: xxx&#x2F;8.2.1 Android&#x2F;1510 (Redmi 4X; Android 7.1.2; Gapps 1; zh_CN; 23; Xiaomi) Content-Type: application&#x2F;x-www-form-urlencoded Content-Length: 109 Host: api.xxx.com Accept-Encoding: gzip mzip= AgOrTaf%2BAI1OoQiapEonDg4iF8yxaY2CcUN0xL7cIEV8bP4I%2BrNDSY3AbRR2Xj6EJyT0XGPd5xSkAiuwGvawny7%2BZVmhABw%3D </code></pre> ```<p>what I am interest in is the body, which is:<p>```<p><pre><code> mzip= AgOrTaf%2BAI1OoQiapEonDg4iF8yxaY2CcUN0xL7cIEV8bP4I%2BrNDSY3AbRR2Xj6EJyT0XGPd5xSkAiuwGvawny7%2BZVmhABw%3D </code></pre> ```<p>surely, it can be decoded by urlencode first and then decoded by base64. After that, you will get a binary data.<p>According to my experence, some website will use zip to compress the data and then encode the binary data of this zip file by base64. while other website will use gzip to compress the data and then encode the binary data.<p>However, this App&#x27;s http post body use neither of these two methods. And what does the `mzip` mean in the body?<p>Dear friend, can you suggest me how to decode this http post body ?

1 comment

andrewstuart超过 7 年前
application&#x2F;x-www-form-urlencoded means this is form data.<p>mzip is the form field name