【发布时间】:2022-01-10 06:33:34
【问题描述】:
这两个请求有什么区别,导致它们从服务器获得不同的结果/响应,尽管它们应该是相同的?
- Chrome 发起简单请求后的请求 点击/导航(成功,响应码为302)
- 我只是复制了 该请求作为卷曲并将其导入邮递员,然后邮递员 绞死
我对 Java 做了同样的事情 - HttpUrlConnection(模仿所有请求标头和 cookie,如 Chrome 发送的),但它挂起并永远等待。这仅仅是因为服务器逻辑不接受非浏览器客户端吗?
以下是我尝试过的步骤:
1. Visited this link: https://www.tokopedia.com/p/handphone-tablet/handphone
2. I opened the inspector and opened the Network - All tab
3. I clicked one of the products
4. I clicked the top request from the Network - All tab
5. I copied it as cURL bash
6. I imported it to Postman
7. I ran that request
8. Postman hanged
【问题讨论】:
标签: java google-chrome http web-services postman