Skip to content

Commit ee3af54

Browse files
committed
On Chrome/WildFly, REST client doesn't work. Seems that XMLHttpRequest
need to be reopen before each POST request
1 parent 5131a1d commit ee3af54

File tree

1 file changed

+2
-1
lines changed
  • websocket/websocket-vs-rest/src/main/webapp

1 file changed

+2
-1
lines changed

websocket/websocket-vs-rest/src/main/webapp/rest.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ function restEchoText() {
7171
payload += "x";
7272
}
7373
restStartTime = new Date().getTime();
74-
xhr.open("POST", restUri, false);
74+
7575
for (var i = 0; i < times.value; i++) {
76+
xhr.open("POST", restUri, false);
7677
xhr.send(payload);
7778
restSendBar.value += 100 / times.value;
7879
}

0 commit comments

Comments
 (0)