返回
404 not found404 not foundthe requested url /mauth/usr/exists was not found on this server.
回复内容: 返回是一个json字符串但是我用curl -l http://....却无法获取
返回
404 not found404 not foundthe requested url /mauth/usr/exists was not found on this server.
问题后来发现是网络链路的问题的,执行curl那台主机与目标服务器是隔绝的,无法互相访问的,蛋疼!
user-agent, cookies, accept, referer等各种参数都会影响请求结果。
我一般先用fiddler找出最少需要的参数与cookie,然后弄curl。
来,最新版本的chrome的javascript调试工具里已经支持curl复制(它可以完全模拟浏览器访问,包括header,cookie,操作系统信息等),具体是 先打倒network 上,之后访问这个页面 之后在那个list点右键,有个copy as curl。之后直接curl的干活
url 写错了吧 ... 或者是服务端对 user-agent 做了限制 ...
用 –user-agent 模拟一下其他浏览器看看 ...
