Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Post a Json object on the web Services( Apigee BaaS )

$
0
0

var uname=tname.value.toString(); var pass=tsurname.value.toString();

 var jsonobj= {


    "username" :'"'+uname+'"',
    "password" : '"'+pass+'"'   
      };

var client= Ti.Network.createHTTPClient({ onload:function(e){}

    client.setRequestHeader('content-type', 'JSON');
client.open('POST',url);
client.send(JSON.stringify(jsonobj));

when i am passing hardcore values in the jsonobj, it completly works fine, but as i am trying to take values from the textfields it does not. blank value are send to web services. can any one help me on this, how can i add user input value from textfield and add to the object and send to the apigee baas.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>