为GWT表单设置自定义HTTP头

如何在使用GWT提交表单时设置额外的HTTP标头。
(我使用FormPanel来构建表单)


概要

从接受的答案:

无法使用FormPanel设置HTTP标头--FormPanel包装标准HTML,不允许设置自定义标头。


不能使用FormPanel设置HTTP头 - FormPanel包装标准HTML <form> ,不允许设置自定义头。

要设置自己的头文件,请使用RequestBuilder

RequestBuilder rb = new RequestBuilder(Method.POST, "http://www.my-server.com");
rb.setHeader("X-My-Header", "VALUE");
Request r = rb.sendRequest(null, new RequestCallback() {...});
链接地址: http://www.djcxy.com/p/52895.html

上一篇: Setting Custom HTTP Header for GWT Forms

下一篇: What do you bind NSArrayController's Managed Object Context to in Xcode 4?