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
<form>, which d开发者_C百科oesn'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() {...});
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论