Cannot create custom HttpRequestManager
Hi,
Thanks for the library. I would like to make use of the HttpRequestManager to be able to reuse the connection. I'm following the exact code example:
const {HttpRequestManager} = require('http2-client'); const httpRequestManager = new HttpRequestManager();
and i'm getting this error: TypeError: HttpRequestManager is not a constructor I'm tried using nodejs12 and nodejs10. I use typescript and i'm compiling to ES6, but also tried ES2018. Did you export this class?
Hey,
It's not exported by "main" this is why you cannot require it. You could be using:
const {HttpRequestManager} = require('http2-client/lib/request');
Although it's not recommended using something that is not exported... Please let me know if it works for you and why you need it.. and I may export it in next version..
Hey hisco,
Thanks, this will work for me!