API: add timeout to http request