Open rlogiacco opened 6 years ago
To allow setting a proxy I've added the use of the agent option in the following two sections of code
agent
https://github.com/telegraf/telegraf-wit/blob/94534277cdbb0ff787d11fc6d0999eb1b564db58/lib/wit.js#L23-L29
https://github.com/telegraf/telegraf-wit/blob/94534277cdbb0ff787d11fc6d0999eb1b564db58/lib/wit.js#L40-L47
They now look like
return fetch(url, { method: 'GET', agent: this.opts.agent, headers: { 'Authorization': `Bearer ${this.token}`, 'Accept': 'application/json', 'v': this.apiVersion }
To allow setting a proxy I've added the use of the
agent
option in the following two sections of codehttps://github.com/telegraf/telegraf-wit/blob/94534277cdbb0ff787d11fc6d0999eb1b564db58/lib/wit.js#L23-L29
https://github.com/telegraf/telegraf-wit/blob/94534277cdbb0ff787d11fc6d0999eb1b564db58/lib/wit.js#L40-L47
They now look like