使用 Windows 脚本的带有自定义标头字段的 HTTP 请求
是否可以使用 Windows Script Host 或任何其他 Windows 脚本技术执行具有特定标头字段(如“referer”、“cookies”或“User-Agent”)的 HTTP 请求?
谢谢。
Is it possible to perform a HTTP Request with specific header fields (like 'referer', 'cookies' or 'User-Agent') using Windows Script Host or any other Windows scripting technology??
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是(VBScript):-
使用 WinHttp 可以为您提供最大程度的控制,如果您想更有效地访问发送的任何 XML DOM,您可以使用 MSXML2.ServerXMLHTTP.3.0。 使用标准的 MSXML2.XMLHTTP.3.0 组件通过 WinINet 为您提供用户代理设置和 cookie 存储等,但会减少您对对话的控制。
Yes (VBScript) :-
Using WinHttp gives you the greatest level of control, you can use MSXML2.ServerXMLHTTP.3.0 if you want more effeciently access any XML DOM sent. Using the standard MSXML2.XMLHTTP.3.0 component goes throught WinINet at gives you the users proxy settings and cookie store etc, but reduces your control over the conversation.
我们可以使用 jsp / java 设置像 Cache-control : 'max-age =10000' 这样的请求头吗?
实际上,只有当用户在指定时间(例如 10 分钟)内返回到此页面时,我才想在单击浏览器后退按钮时查看带有旧数据的上一页。
谢谢,
阿努拉格
Can we set the request header like Cache-control : 'max-age =10000' using jsp / java?
Actually I want to see the previous page with old data on click of browser's back button only if user comes back to this page with in a specified time , say 10 minutes.
Thanks,
Anurag