1
Есть ли способ, которым я могу установить заголовки запросов в титане ?.Как установить заголовки запросов в титане
например: API = abcdefgb56432142345234534;
мой XHR:
var url = "http://www.appcelerator.com";
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload: function(e) {
Ti.API.info("Received text: " + this.responseText);
alert('success');
},
// function called when an error occurs, including a timeout
onerror: function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout: 5000 // in milliseconds
});
// Prepare the connection.
client.open("GET", url);
// Send the request.
client.send();
Это не работает :( –
@ user3475082 Oppz мой плохой .. проверьте код, который я обновил – jlocker
Ничего себе работает как шарм. Ты спас мой день ... спасибо @jlocker :) –