New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP2 ClientHttp2Stream support #891
Labels
Type: Documentation
An Issue or Pull Request for improving or updating documentation.
Comments
Thanks |
Thank you |
tunnckoCore
added
the
Type: Documentation
An Issue or Pull Request for improving or updating documentation.
label
Dec 2, 2022
@FStefanni I think it is supported too. We don't do much with the stream, we just get the headers - at least that's the very basic explanation of what Formidable is doing, haha. I guess it's the typings. |
Hi, yes I also suppose (but I have not done a deep dive in the code) that its only a matter of typings. Regards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Support plan
Enterprise): Community
Context
What problem are you trying to solve?
Hi,
I am using
formidable
with Typescript.I have seen that the
formidable.parse()
method acceptshttp.IncomingMessage
, which is fine for server side, and for HTTP1 client-side.But client-side with HTTP2, it should also accept
http2.ClientHttp2Stream
.So the questions/issues are:
formidable
work with alsohttp2.ClientHttp2Stream
? I suppose so, but the Typescript compiler complains... (before putting a brutal unsafe cast I want to be sure)Regards
EDIT
Just seen that also
http2.Http2ServerRequest
makes the Typescript compiler complain. So even HTTP2 seems not explicitly supported. So definitely supporting HTTP2 would be a useful feature.Do you have a new or modified API suggestion to solve the problem?
If as I suppose,
formidable
already supports the HTTP2 client side, the problem fix is just a matter of updating the types definitions offormidable.parse()
to accept also ahttp2.ClientHttp2Stream
(http.IncomingMessage | http2.ClientHttp2Stream
).The text was updated successfully, but these errors were encountered: