httpclient timeout

You must Login before you can answer or comment on any questions.

Hi,

I have a http request. after about 10 seconds, i have a timeout.. i changed it to 20 s : client.setTimeout(20000);

but it doesn't change anything...

please help..

thanks

3 Answers

setTimeout(function, number) is not working because it is not a valid method signature on the http client API. Please set the timeout while constructing your http client:

var client = Titanium.Network.createHTTPClient({timeout: 20000});

i think you are downloading large file so please write your file on external storage and then take it

— answered 8 months ago by Arun Shejul
answer permalink
1 Comment
  • what do you mean with external storage ? the only way i see is to create a file in the phone and to read it..

    — commented 8 months ago by Djamel ZAHAL

use it like setTimeout(function(){ you logic here or any function calling}, 20000); it should work.

Your Answer

Think you can help? Login to answer this question!