curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Making HTTP2 requests

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Sat, 15 Jul 2023 13:53:50 +0200 (CEST)

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
Received on 2023-07-15