4 ms·
You cannot control the HTTP version in a webpage with JavaScript... The browser has complete control over selecting an appropriate version. But since Electron
by CommonGuy 3y ago
You cannot control the HTTP version in a webpage with JavaScript... The browser has complete control over selecting an appropriate version.
But since Electron includes nodejs, it should be possible, but probably not that easily.
- KingMob 3y agoI don't know what the problem is precisely, but I suspect the issue lies somewhere other than the browser's standard HTTP version negotiation. I think this because, when I was testing Postman, if I set up my web server to support only HTTP/2 in the TLS ALPN, Postman didn't fall back to HTTP/2, it just failed. If the standard browser negotiation were happening in Postman, I would have expected my setup to force HTTP/2, even if it generally wanted HTTP/1. My guess is on the Postman side, they simply don't support H2 in the ALPN. I admit, I know nothing about Electron, so maybe there really is some weird limitation. But I think it's more likely Postman just didn't want to write the code to support HTTP/2. Most API users don't care about the transport; but I maintain a web server, and learning this rendered Postman useless for me. For now, it's curl or Insomnia.