如何为 JavaScript 设置 HttpPost 和标头?
当我搜索这个问题时,我总是得到“如何使用 JavaScript 设置标头”的答案,但我想为 JavaScript 设置 HttpPost 标头。
我尝试在网站上登录,但响应告诉我我需要 JavaScript。那么如何伪造 JavaScript 呢?我需要 Cookie 吗?或标题?是否可以在版本 x 中设置标头“JavaScript”?
我想一定有办法做到这一点:-) 我不想向用户显示网站,我只想使用用户信息登录并解析结果以获取用户需要的一些信息。就是这样。
谢谢
编辑:也许解释一下我想尝试的内容是个好主意: 我尝试使用我的身份验证数据登录手机提供商网站,并读出该帐户的当前消费数据和银行余额。我不想每次都用手机登录才能看到这个!我还想要确切的数据,而不仅仅是来自任何可以计算它的应用程序的自我计算数据! :)
When I search for this question I always get the answer for "How to set header WITH JavaScript" but I want to set the HttpPost Header FOR JavaScript.
I try to Formlogon on a Website, but the response tell me that I need JavaScript. So how can I fake JavaScript? Do I need a Cookie? or a Header? Isn't it possible to set a header "JavaScript" with Version x?
I think there must be a way to do this :-)
I dont want to show the user a Website, i only want to login with the Users information and parse the result for some informations the user needs. Thats it.
Thanks
EDIT: maybe its a good idea to explain what i want to try:
I try to login to a mobilephone provider website with my auth-data and reading out the current consumption data and the bank balancce for this account. And i dont want to login everytime to see this with my phone! And i also want the EXACT data not only the self calculated data from any app wich can calculate it! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 Javascript 的可用性不是在 HttpPost 中确定的,而是通常由客户端/服务器端代码的组合来确定。 此处提供了一个示例。
I think the availabilty of Javascript is not determined in the HttpPost but usually made with a combination of client/server side code. An example is available here.