Content-Type为application/octet-stream格式的请求如何发?

王胖胖
  • 29

向oppo发送请求,请求头如下

POST /client/get_search_completion.pb HTTP/1.1
brand: samsung
rom: 2
desktop: desktop_other
locale: zh_CN
uid: oppo.uid.nearme
Referer: SM-G955N/appstore/4.3.1/354730010542250
User-Agent: SM-G955N/4.4.2/Market/4.3.1
Connection: Keep-Alive
Ext-System: SM-G955N/4.4.2/0/2/2/4.3.1/20
Ext-User: -1/354730010542250/0
Content-Type: application/octet-stream
Accept-Encoding: gzip
Screen: 1280#720
VersionCode: 4310
SourcePath: SOSU
ImgType: webp
Host: i3.store.nearme.com.cn
Content-Length: 48

data部分如下:

1: 18446744073709551615
2: 19
3: 20
4: 0
5: "SM-G955N"
6: 0
7: 0
8: 3
10: 1
13: "二手车"
15: 1

返回数据部分如下:

1: 11
2: 0
3: 0
4 {
  1: 0
  4: 0
  5: 0
  6: 0
  7: "二手车"
  10: 0
  13: 0x0
  17: 0
  32: 0
  34: 0
  37: 0x0
  38: 0
  39: 0
  48: 0
  49: 0
  50: 0
  52: 0
  57: 0
  58: 0
  60: 0
  61: 0
  62: 0
  70: 0
  80: 0
  81: 0
  84: 0
  85: 0
  93: 0
  97: 0
  99: 0
  100: 0
  101: 0
  102: 0
  103: 0
  106: 0
  111: 0
}
4 {
  1: 20324460
  4: 0
  5: 1518344705000
  6: 77
  7: "人人车二手车"
  10: 9717
  13: 0x0
  15: "com.renrenche.carapp"
  16: "4.7.2"
  17: 472000
  18: ""
  19: "http://storepic.oppomobile.com/img/201802/09/6651030ef5d2cb3cbe0476ff95692e3e.png.icon.h256.jpg"
  25: "http://i3.store.nearme.com.cn/client/get_down_url.pb?pid=20324460"
  32: 1
  34: 4824010
  37: 0x4045000000000000
  38: 0
  39: 684381
  48: 0
  49: 0
  50: 1
  52: 0
  54: "42"
  55: "482万次安装"
  57: 0
  58: 7
  60: 0

请问这种类型的数据如何在requests内发送?

回复
阅读 10k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏