1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    10
    Vote Rating
    0
    FlavioRamos1987 is on a distinguished road

      0  

    Default Unanswered: Send JSON to Server

    Unanswered: Send JSON to Server


    Hey guys!

    I need to send the json at the body request to the server process this correctly.

    My .php:

    PHP Code:
    <?php     $json file_get_contents('php://input');     $obj json_decode($json);
         
    $email $obj->{'login'};     $senha $obj->{'senha'};
    And my request in sencha:
    Code:
    Ext.data.JsonP.request
            (
                {
                    url: "http://www.BLABLABLA.net/webservice/connect.php",
                    callbackKey: "callback",
                    params: 
                    {
                        email: email,
                        senha: password
                    },
    Any ideas how can i do this?

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,663
    Answers
    130
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    open the chrome developer tools, go to network -> XHR and check if the request fires, what params are getting send and how the response looks like.
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    10
    Vote Rating
    0
    FlavioRamos1987 is on a distinguished road

      0  

    Default


    Request and Response.

    Request URL:http://www.myDomain.net/webservice/c...=1368800635283

    Request Method:GET
    Status Code:200 OK


    Request Headers
    Accept:*/*
    Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
    Accept-Encoding:gzip,deflate,sdch
    Accept-Language:en-US,en;q=0.8,pt-BR;q=0.6,pt;q=0.4
    Connection:keep-alive
    Host:www.myDomain.net
    Referer:http://localhost/myDomain/main.html
    User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
    Query String Parametersview sourceview URL encoded
    email:flavioramos1987@gmail.com
    senha:021011
    callback:Ext.data.JsonP.callback
    _dc:1368800635283

    Response Headers
    Connection:keep-alive
    Content-Length:48
    Content-Type:application/json
    Date:Fri, 17 May 2013 14:19:08 GMT
    Server:Microsoft-IIS/7.5
    X-Cache:MISS from brma.hportugues.com.br
    X-Powered-By:PHP/5.3.18
    X-Powered-By:ASP.NET

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar