title: Can't send HTTP/2 request with curl
body: <p>I install curl with support http2.0 protocol, and i see HTTP2 in version info.</p>
  
  <pre><code>$ ./curl --version
  curl 7.42.1 (x86_64-apple-darwin14.5.0) libcurl/7.42.1 OpenSSL/1.0.2a zlib/1.2.5 nghttp2/0.7.13
  Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
  Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets
  </code></pre>
  
  <p>But when i send a request via curl (with verbose mode), i see http1.1 protocol.</p>
  
  <pre><code>./curl -v --http2 https://http2bin.org/get
  *   Trying 104.131.161.90...
  * Connected to http2bin.org (104.131.161.90) port 443 (#0)
  * ALPN, offering h2-14
  * ALPN, offering http/1.1
  * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
  * successfully set certificate verify locations:
  *   CAfile: /usr/local/etc/openssl/cert.pem
    CApath: none
  * TLSv1.2, TLS Unknown, Unknown (22):
  * TLSv1.2, TLS handshake, Client hello (1):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, Server hello (2):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, CERT (11):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, Server key exchange (12):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, Server finished (14):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, Client key exchange (16):
  * SSLv2, Unknown (20):
  * TLSv1.2, TLS change cipher, Client hello (1):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, Finished (20):
  * SSLv2, Unknown (20):
  * TLSv1.2, TLS change cipher, Client hello (1):
  * SSLv2, Unknown (22):
  * TLSv1.2, TLS handshake, Finished (20):
  * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  * ALPN, server accepted to use h2-14
  * Server certificate:
  *    subject: OU=Domain Control Validated; OU=EssentialSSL; CN=www.http2bin.org
  *    start date: 2015-02-21 00:00:00 GMT
  *    expire date: 2016-02-21 23:59:59 GMT
  *    subjectAltName: http2bin.org matched
  *    issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Domain Validation Secure Server CA
  *    SSL certificate verify ok.
  * Using HTTP2
  * Using HTTP2
  * SSLv2, Unknown (23):
  * SSLv2, Unknown (23):
  * SSLv2, Unknown (23):
  &gt; GET /get HTTP/1.1
  &gt; Host: http2bin.org
  &gt; User-Agent: curl/7.42.1
  &gt; Accept: */*
  &gt; 
  * http2_recv: 16384 bytes buffer
  * SSLv2, Unknown (23):
  * SSLv2, Unknown (23):
  * http2_recv: 16384 bytes buffer
  * SSLv2, Unknown (23):
  * http2_recv: 16384 bytes buffer
  * SSLv2, Unknown (23):
  &lt; HTTP/2.0 200
  &lt; server:h2o/1.6.1
  &lt; date:Wed, 03 Feb 2016 15:44:23 GMT
  &lt; content-type:application/json
  &lt; access-control-allow-origin:*
  &lt; access-control-allow-credentials:true
  &lt; x-clacks-overhead:GNU Terry Pratchett
  &lt; content-length:252
  &lt; 
  {
    "args": {}, 
    "headers": {
      "Accept": "*/*", 
      "Connection": "keep-alive", 
      "Host": "http2bin.org", 
      "User-Agent": "curl/7.42.1", 
      "Via": "2 http2bin.org"
    }, 
    "origin": "193.238.96.12", 
    "url": "https://http2bin.org/get"
  }
  * Connection #0 to host http2bin.org left intact
  </code></pre>
  
  <p>Now cURL send request via HTTP/1.1</p>
  
  <p>And if i set the <code>--http1.0</code> option, then cURL send a request via HTTP/1.0.</p>
  
  <p>Why cURL not send request via HTTP/2.0?</p>
  
  <p>Operation system: OS X Yosemite (10.10.5).</p>
  
  <p>Install cURL and OpenSSL via HomeBrew.</p>
  
  <p>Thank.</p>