HTTP headers cannot be set using FormPanel
- FormPanel
wraps a standard HTML <form>
that does not allow you to set custom headers.
To set your own headers, use 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() {...});
Jason terk
source share