Setting Custom HTTP Header for GWT Forms
How can I set additional HTTP headers while submitting forms with GWT.
(I am using FormPanel for building the form)
Summary
From accepted answer:
HTTP headers cannot be set using FormPanel - FormPanel wraps the standard HTML , which doesn't allow setting custom headers.
HTTP headers cannot be set using FormPanel
- FormPanel
wraps the standard HTML <form>
, which doesn't allow setting custom headers.
To set your own headers use a 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/52896.html
上一篇: gettext字符编码
下一篇: 为GWT表单设置自定义HTTP头