How can I use curl
to fetch pages using brotli compression?
According to release notes this should be somehow possible to do. My curl version seems ok:
$ curl -V
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
apt-get install
also claims curl is already the newest version (7.58.0-2ubuntu3.8).
However when I'm trying to fetch a page I'm getting errors:
$ curl --compressed https://httpbin.org/brotli
curl: (61) Unrecognized content encoding type. libcurl understands deflate, gzip content encodings.
$ curl https://httpbin.org/brotli
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
What am I missing? I also tried to install libbrotli-dev
, but this didn't change anything.