Http-client and HTTP2 not working?

Hi, fairly inexperienced Haskell user here. I’m trying to send an HTTP POST to an API endpoint using the Network.HTTP.Client library. I use the parseRequest function to get a generic request, and then I modify that to set the method, requestBody, and requestHeaders values. That all works fine. However, when I additionally modify the requestVersion value to http20 (which is defined in Network.HTTP.Types.Version) and use httpLbs to run the request, I get a 505 HTTP version not supported error from the server. This is strange because I have previously sent a POST request to this API endpoint using curl in verbose mode and I can indeed verify it is able to use HTTP/2.

So, could someone please tell me what is the issue here? Am I using the library wrong, using the wrong library, some other problem entirely? Thanks.

Are you able to log the exact requests being made by your haskell program? Request has a Show instance. Then you could compare to the verbose output of curl and see if there are any interesting differences.