adding timeout and compression support

* timeout will treated as a exception
* compression support currently only support gzip compression