hubotio / hubot

A customizable life embetterment robot.

Home Page:https://hubotio.github.io/hubot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP daemon cannot be disabled

hatxet opened this issue · comments

According to src/robot.js on line 26, it's possible to disable the HTTP daemon by setting httpd to false.

Even though it sets up a null router, HTTP requests are still executed because it always returns a scoped-http-client object.

return HttpClient.create(url, httpOptions).header('User-Agent', `Hubot/${this.version}`)

In my case it means that tests made with hubot-test-helper won't work as expected when the rooms have httpd disabled.

I think an easy solution would be to replace get and post from the http client object with empty functions if httpd is set to false.

This was fixed when #1581 landed, which includes #1548