具有ExtJS 4商店的HTTP标头 [英] HTTP Headers with ExtJS 4 Stores

查看:98
本文介绍了具有ExtJS 4商店的HTTP标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有几家专卖店。但是在某个时候,我会在所有这些中添加一个HTTP头。如何使用ExtJS 4?

解决方案

假设您正在使用ajax代理,可以更新 标题 属性。看一下代码,它将适用于那里的标题。



更多涉及的解决方案将涉及覆盖 doRequest 函数做任何适合你的。


I have already a few stores instanciated. But at a certain point, I'd to add a HTTP header in all of them. How can I do that, with ExtJS 4 ?

解决方案

Assuming that you are using an ajax proxy, you could update the headers property on the stores in question. Looking at the code it'll apply whatever is in there as the headers.

A more involved solution would involve overriding the doRequest function to do whatever suited you.

这篇关于具有ExtJS 4商店的HTTP标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆