elevate icon indicating copy to clipboard operation
elevate copied to clipboard

timeout interval option for http request

Open tchukuchuk opened this issue 11 years ago • 6 comments

Hi

I need for a project to have a timeout greater then 1min (default timeout for NSMutableURLRequest).

Regards,

Julien

tchukuchuk avatar Jul 15 '14 09:07 tchukuchuk

Have you tried using the existing timeout functionality? Elevate knows what request it's waiting on, and aborts it automatically.

mattgreen avatar Aug 22 '14 00:08 mattgreen

Yes, but after some tests it doesn't work.

tchukuchuk avatar Aug 22 '14 06:08 tchukuchuk

That makes sense; you want the request to go longer than one minute, rather than having the task's timeout take a certain amount of time, right?

mattgreen avatar Aug 22 '14 10:08 mattgreen

Yes. I have to manage with huge JSON data and it can take a lot of time to be generated...

tchukuchuk avatar Aug 22 '14 12:08 tchukuchuk

OK, that's perfectly reasonable. I hope your server is using async I/O though :).

I'd be glad to merge this if you changed the option name to request_timeout to differentiate it from the regular timeout option.

mattgreen avatar Aug 22 '14 14:08 mattgreen

I'm interested by async i/o if you have some documentation :)

tchukuchuk avatar Aug 23 '14 10:08 tchukuchuk