ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

Does POST function support http2? #1618

Open bj7 opened 3 years ago

bj7 commented 3 years ago

Hello, I saw plenty of examples in different tickets on how to enable http2 support in GET requests (https://github.com/visionmedia/superagent/pull/1399#issuecomment-409544917), but I could not find any examples of enabling it in POST requests.

I've set the http2 property to true superagent.http2 = true; superagent .post(ajaxUrl + "?module=" +..... However, whenever I look at my nginx access logs, the POST request is showing as http1.1. Is there any explanation for why running the same code in the browser reports http2, but running it in a node process shows as http 1.1? Thanks in advance