Fix call to set timeout and HTTP headers

* Fixes #15