[英]Replace curl with wget for compressed data
We are using curl
and we want to change to wget
.我们正在使用curl
并且我们想更改为wget
。
The curl
command is like following: curl
命令如下:
curl -fsSLO --compressed "https://yarnpkg.com/downloads/v1.22.4/yarn-v$1.22.4.tar.gz" && \ mkdir -p /opt && \
tar -xzf yarn-v1.22.4 -C /opt/
I've tried with wget
:我试过wget
:
wget -c "https://yarnpkg.com/downloads/v1.22.4/yarn-v$1.22.4.tar.gz"
But not sure regard compressed to get the same effect exactly in wget
.但不确定在wget
中是否考虑压缩以获得相同的效果。
wget
has the --compression=type
option: wget
有--compression=type
选项:
--compression=type
Choose the type of compression to be used. Legal values are auto, gzip and none.
For both curl
and wget
compression option adds Accept-Encoding
header to a request.对于curl
和wget
压缩选项,将Accept-Encoding
header 添加到请求中。 curl
adds Accept-Encoding: deflate, gzip, br
and wget
adds Accept-Encoding: gzip
. curl
添加Accept-Encoding: deflate, gzip, br
和wget
添加Accept-Encoding: gzip
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.