When sending the code below, everything works great in FF, IE, but the
response that comes back in chrome has a status code of "0", and
contains no data.  At a minimum my php script would response back
"FALSE".

Code:
String requestData =
URL.encode("clientUsername="+authentication.getUsername()
+"&userPassword="+authentication.getPassword()+"&infoNeeded=YES");
        String requestURL = URL.encode("http://www.mydomain.com/testing/
loginUser.php");
                RequestBuilder builder = new RequestBuilder(RequestBuilder.POST,
requestURL);
                builder.setTimeoutMillis(5000);
                builder.setHeader( "Content-Type", "application/x-www-form-
urlencoded" );
                builder.setRequestData(requestData);
                builder.setCallback(new RequestCallback() {
                        public void onResponseReceived(Request request, 
Response response)
{

                                if(response.getText().equals("FALSE")){
                                        callback.onFailure(new 
AuthenticationException("Your not a valid
user"));
                                }else {
                                        if(response.getStatusCode() == 200){
                                                
setAccount(parseAccount(response.getText()));
                                                callback.onSuccess(account);
                                        } else {
                                                
Window.alert(response.getStatusText()
+"\n"+response.getStatusCode());
                                        }
                                }
                        }
                        public void onError(Request request, Throwable 
exception) {
                                System.out.println("Error: 
"+exception.getMessage());
                                Window.alert("Error:  "+exception.getMessage());
                        }
                });
                try{
                        builder.send();
                }catch (RequestException re) {
                        System.out.println("Error: "+re.getMessage());
                }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to