Re: Making HTTP2 requests
Daniel Stenberg via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 14 Jul 2023, Luke Schlather via curl-users wrote: > I am attempting to test a local .NET Kestrel server which only accepts > http2 requests. However it seems that even when I specify --http2 it sends > http1 requests. > >> curl --http2 -i http://localhost:5000/health Doing HTTP/2 with a HTTP:// URL scheme means that curl makes a HTTP/1 request with an upgrade header. >> curl --http2-prior-knowledge -i http://localhost:5000/health > HTTP/1.1 400 Bad Request > Connection: close > Content-Type: text/plain > Content-Length: 56 > > An HTTP/1.x request was sent to an HTTP/2 only endpoint. This is unexpected. Are you sure your curl supports HTTP/2 ? -- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://curl.se/support.html -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html