You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SynchronousXHR.java 622B

123456789101112131415161718192021222324
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import com.google.gwt.xhr.client.XMLHttpRequest;
  6. public class SynchronousXHR extends XMLHttpRequest {
  7. protected SynchronousXHR() {
  8. }
  9. public native final void synchronousPost(String uri, String requestData)
  10. /*-{
  11. try {
  12. this.open("POST", uri, false);
  13. this.setRequestHeader("Content-Type", "text/plain;charset=utf-8");
  14. this.send(requestData);
  15. } catch (e) {
  16. // No errors are managed as this is synchronous forceful send that can just fail
  17. }
  18. }-*/;
  19. }