Adding timeout to http request (sync and async)