-
Notifications
You must be signed in to change notification settings - Fork 18
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
No HTTP (without TLS) support #29
Comments
For a live version of the example code check https://runkit.com/jolg42/5e15b3136499c3001b25dd7d |
If you specify a The integration with Got is still WIP. Yep, there will be automatic protocol detection. |
Thank you for the fast answer :) I just tried h2got.post("http://enhcvrwpf7kw6.x.pipedream.net", {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: "Hello" }),
protocol: "http:"
}) And got I think it would be great to add it, I'm aware that https is recommended but it is not applicable in my case. Do you know where someone should start investigating in the project to add the feature maybe? |
Well, there is |
I'm also looking for HTTP/2 support without TLS. So far, the only way I can get it working with import got from 'got';
import http2 from 'http2-wrapper';
const session = http2.connect('http://internal-dns.com');
(async () => {
const response = await got('http://internal-dns.com/internal-endpoint', {
request: http2.request,
protocol: 'https:',
h2session: session,
});
console.log(response.httpVersionMajor);
// -> 2
})(); |
I used it like this:
And I found the error from the code here:
http2-wrapper/source/client-request.js
Lines 76 to 78 in 842ce09
As http is mentioned in the README I thought it would be possible but it looks like https is required. Is there a reason for that?
The text was updated successfully, but these errors were encountered: