wget --header=“User-Agents: Chrome” --header=“Content-Type: Application/json” --post-data=‘{“url”:“https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf”}’ http://node-express:3000/getFontSvg -q -O -
wget --header=“User-Agents: Chrome” --header=“Content-Type: Application/json” --post-data=‘{“url”:“https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf”}’ http://localhost:3000/getFontSvg -q -O -
wget --header=“Content-Type: Application/json” --post-data “url=https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf” http://node-express:3000/getFontSvg
wget --header ‘content-type:application/json’ --body-data ’
{“url”:“https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf”}
’ http://node-express:3000/getFontSvg
wget --method POST --header ‘Content-Type: application/json;charset=utf-8’ --body-data ‘url=https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf’ ‘http://node-express:3000/getFontSvg’
解决安装curl慢的问题:
sed -i ‘s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g’ /etc/apk/repositories
curl -X POST ‘http://node-express/getFontSvg’ -H ‘Content-Type: application/json’ -d ‘{“url”: “https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf”}’
curl -X POST ‘https://node-express.in.zcool.cn/getFontSvg’ -H ‘Content-Type: application/json’ -d ‘{“url”: “https://zcool-cloud-resource-test.oss-cn-beijing.aliyuncs.com/7f39/0e9e4d/f4c73be0-bc11-4f1a-b88b-7d40e23e47f0.ttf”}’
本文档展示了如何使用wget和curl命令行工具向HTTP服务器发送POST请求,获取字体SVG资源。同时,针对curl安装慢的问题,提供了通过修改repositories配置和使用curl的POST方法来加速下载的方法。示例中涉及的URL指向阿里云存储的字体资源,并且请求头包含了模拟Chrome浏览器的User-Agent和Content-Type。

1367

被折叠的 条评论
为什么被折叠?



