Http2.Request is not a function

Is Http2 not supported in the workers runtime? I'm not familiar with http2 - this is coming from a library I'm using.
6 Replies
Cyb3r-Jak3
Cyb3r-Jak315mo ago
What is the full error? I believe workers only supports node-fetch which is HTTP/1.1
Tin Cap
Tin CapOP15mo ago
Nothing much more helpful:
Error in worker TypeError: Http2.Request is not a function
at Http2.doUri (worker.js:2501:17)
at tryAHost (worker.js:2484:19)
at Http2.do (worker.js:2498:11)
at Http2.<computed> [as post] (worker.js:2448:24)
Error in worker TypeError: Http2.Request is not a function
at Http2.doUri (worker.js:2501:17)
at tryAHost (worker.js:2484:19)
at Http2.do (worker.js:2498:11)
at Http2.<computed> [as post] (worker.js:2448:24)
Cyb3r-Jak3
Cyb3r-Jak315mo ago
Yeah not sure what that means seems like the http2.request is being used wrong
Tin Cap
Tin CapOP15mo ago
It's coming from a popular library ably that is not supporting ESM or the Cloudflare Worker environment. I've been using parts of it successfuly in Cloudflare Workers, but I just started using a new API and it's giving them this error. Not 100% surprising.
Cyb3r-Jak3
Cyb3r-Jak315mo ago
Just googled it and are you using the web-worker bundle? Looking at old issues it seems that is the recommened one for Workers
Tin Cap
Tin CapOP15mo ago
I tried that and it seems to only work in a browser. Complains about window not being found. I'm just going to try using the REST api
Want results from more Discord servers?
Add your server