Results 1 to 2 of 2

Thread: why Ext.data.JsonP.request() returns timeout?

  1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    1

    Default why Ext.data.JsonP.request() returns timeout?

    In client,i used the request method to verify the user and password, the server(programed with nodejs) has received the user id and password,. But why Ext.data.JsonP.request() returns timeout after more than 6 second?

    Ext.data.JsonP.request({
    url : "http://192.168.1.2:8000/Login",
    callbackKey : 'callback',
    params : {
    userId : userId,
    psw : psw
    },
    timeout: 30000,
    success : function(result,req) {
    console.log("login success");
    },
    failure : function(result,req) {
    console.log("login failure :"+result.toString());
    }
    });

    And the server programed as:

    if(uri === "/Login") {
    var userInfo = qs.parse(url.parse(request.url).query);
    console.log(userInfo.userId +"-"+userInfo.psw);
    response.writeHead(200, {"Content-Type": "text/html"});
    response.end("ok");
    }

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    164
    Answers
    13

    Default

    Have you tried changing the server to respond with a content type of javascript?

    Have you tried using an Ajax request?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •