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

Sending a message via HttpClient()

$
0
0

I'm doing an app to Android. In my application the user have to insert the name, the email, cell phone number and a message. When I click in "Send" the message will be dispatched. But if it is not being performed. Here is my code. What's wrong? If you have another solutions..

message_send.addEventListener('click',function() { var params = { 'name':field_name.value, 'email': field_email.value, 'number': field_number, 'message': message };

var xhr = Ti.Network.HTTPClient({
    onload : function(){
    Ti.API.info('----on load: ' + JSON.stringify(e));
    },
    onerror : function(e){
    Ti.API.info('----on error: ' + JSON.stringify(e));
    },
});
xhr.open("POST", 'http://89.237.149.36/ws/resources/clm/newclm');
xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
xhr.send(params);

});


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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