I follow the example code provided by Google GWT to send a HTTP GET request and receive the response. The GET request was sent out successfully, but can't receive response message. Actually the response message has been sent back, according to Wireshark trace. Does anybody know why?
String urlCityList = "http://www.abcdeft.com/abc/def"; // Here is just a fake url, but I used real url when trouble shooting. RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(urlCityList)); try { Request request = builder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { } public void onResponseReceived(Request request, Response response) { // Window.alert(Integer.toString(response.getStatusCode())); // I tried to print out the status code.It's 0, means nothing is received. But actually I can see the response message in wireshark tracing. Window.alert("Could not get HTTP response."); // The code goes to this branch. //Window.alert(response.getText()); if (200 == response.getStatusCode()) { text = response.getText(); parseMessage(response.getText()); //text = response.getStatusText(); } else { //Window.alert(response.getStatusText()); //Window.alert(Integer.toString(response.getStatusCode())); } } }); } catch (RequestException e) { } } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.