POST请求在Postman中起作用,但在cURL中不起作用

时间:2019-02-28 14:00:19

标签: http curl http-post httprequest postman

我正在用邮递员和cURL发送相同的POST请求,并收到不同的响应。我试图将票添加到https://tickets.liverpoolfc.com/PagesPublic/ProductBrowse/VisualSeatSelection.aspx?stadium=AS&product=18LGAC&campaign=&type=H&productsubtype=HOME&productIsHomeAsAway=N

的购物篮中

cURL请求:

curl -X POST 'https://tickets.liverpoolfc.com/PagesPublic/ProductBrowse/VisualSeatSelection.aspx?campaign=&product=18LGAC&productIsHomeAsAway=N&productsubtype=HOME&stadium=AS&type=H' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'cache-control: no-cache' -H 'content-type: application/x-www-form-urlencoded' -H 'origin: https://tickets.liverpoolfc.com' -H 'postman-token: 7e59c960-8b13-e21d-a6ff-f70ab99e1174' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36' -d '{"__VIEWSTATE":"/wEPDwUJMzkxOTk4MjAyD2QWAmYPZBYCZg9kFgICAw9kFgJmD2QWCAIDDw8WAh4HVmlzaWJsZWhkZAIHDw8WAh8AaGRkAhEPDxYCHwBoZGQCIQ9kFgICAQ9kFgICCQ9kFgQCHQ9kFgICAQ9kFgRmD2QWHAIBD2QWAgIBDxYCHgRUZXh0BRhTZWxlY3QgQnkgU3RhbmQgYW5kIEFyZWFkAgMPFgIfAWVkAgUPFgIfAQUNVGlja2V0IEZpbHRlcmQCBw8WAh8AZxYKAgEPFgIfAQUUV2hhdCBpcyB5b3VyIGJ1ZGdldD9kAgMPDxYCHwEFDU1pbmltdW0gUHJpY2VkZAIEEBAPFgYeDkRhdGFWYWx1ZUZpZWxkBQVQcmljZR4NRGF0YVRleHRGaWVsZAUFUHJpY2UeC18hRGF0YUJvdW5kZxYCHghvbmNoYW5nZQXJAWRvY3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STkxFWRRMRkMgRk9VTkRBVElPTiBFVkVOVBUCBjE4TEhCTgYxOExHQUMUKwMCZ2cWAQIBZGRksTlUnEdbeRpFYD1y9tw2g5biXJk=", "ctl00$ctl00$SiteMasterBody$ContentPlaceHolder1$uscSeatSelection$btnBuy":"Buy", "ctl00$ctl00$SiteMasterBody$ContentPlaceHolder1$uscSeatSelection$ddlGameSelection":"18LGAC", "ctl00$ctl00$SiteMasterBody$ContentPlaceHolder1$uscSeatSelection$hdfSelectedSeats":"MSU-U9/84/0250#A", "ctl00$ctl00$SiteMasterBody$ContentPlaceHolder1$uscSeatSelection$uscStandAndAreaSelection$hdfProductCode":"18LGAC", "ctl00$ctl00$SiteMasterBody$ContentPlaceHolder1$uscSeatSelection$uscStandAndAreaSelection$hdfProductPriceBand":"A"}' -v -i 'https://tickets.liverpoolfc.com/PagesPublic/ProductBrowse/VisualSeatSelection.aspx?campaign=&product=18LGAC&productIsHomeAsAway=N&productsubtype=HOME&stadium=AS&type=H'

响应:

https://pastebin.com/z3hTUhYC

但是,当我与Postman一起发送邮件时,我得到了想要的答复,并且机票已添加到我的购物篮中,该请求过去可以正常工作,但现在突然停止工作,我不确定为什么。

这是邮递员请求的屏幕截图:

Headers Body

0 个答案:

没有答案