我有来自代理工具的原始HTTP帖子请求。我想用Python重复这些请求,但我看到的问题是Python的requests
模块需要请求主体被分类为cookie,url,header等。有没有其他方法可以直接发送帖子请求如下所示,没有任何解析?
POST /ping HTTP/1.1
Host: api-ping.intercom.io
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Referer: https://google.com
Cookie: fbtagfired=1; XSRF-TOKEN=ZSvws4XGAi5xJ7YXVtNXaKC5BWnkfuq%5FfFWNW3AIHF8; optimizelyEndUserId=oeu1471151696291r0.5966759731131964; optimizelySegments=%7B%22298381354%22%3A%22ff%22%2C%22298764299%22%3A%22direct%22%2C%22298833008%22%3A%22false%22%2C%225339512050%22%3A%22none%22%2C%225679980916%22%3A%22true%22%2C%226343420664%22%3A%22true%22%2C%226332454984%22%3A%22true%22%2C%225637610161%22%3A%22Custom%22%2C%225758861514%22%3A%22false%22%7D; optimizelyBuckets=%7B%7D;
Content-Length: 176
Origin: https://google.com
Connection: keep-alive
app_id=rtd418mk&user_data=%7B%7D&referer=https%3A%2F%2Ftest.com%2Fd%2Flogin&widget_src=%5B%22https%3A%2F%2Fwidget.intercom.io%2Fwidget%2Frtd418mk%22%5D&Idempotency-Key=2ceffee9