Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何查看请求的状态码?我想检查用于访问页面的重定向类型。
对于响应对象,我会使用 *response.status_code*
没有请求的状态码之类的东西。您可以改用 HTTP 引用 [1] 或让链接包含标识源的 HTTP 参数(例如,?src=example.com)
[1] http://en.wikipedia.org/wiki/HTTP_referer
我可能错了,但是没有传入请求状态代码之类的东西,应用程序在重定向的情况下执行请求从初始请求检查位置获取 302 并执行另一个请求。HTTP 中不存在类似“traceroute”之类的传入请求的历史记录。