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