堪称神器的命令行工具系列——curl
关于 curl
如何使用
curl https://nicelinks.site/
-e
curl -e 'https://nicelinks.site?q=quickapp' https://quickapp.lovejade.cn/
--limit-rate
curl --limit-rate 200k https://nicelinks.site
-F
curl -F 'file=@example.png' https://example.com/files
curl -F 'file=@example.png;type=image/png' https://example.com/files
curl -F 'file=@example.png;filename=me.png' https://example.com/files
curl 妙用
查看网页源码
curl https://nicelinks.site/
curl https://nicelinks.site/\?_escaped_fragment_
if ($http_user_agent ~* "baiduspider|twitterbot|facebookexternalhit|rogerbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator") {
set $prerender 1;
}
if ($args ~ "_escaped_fragment_") {
set $prerender 1;
}
if ($prerender = 1) {
set $prerender "127.0.0.1:3000";
rewrite .* /$scheme://$host$request_uri? break;
proxy_pass http://$prerender;
}
curl -o your-file-name.html https://nicelinks.site/\?_escaped_fragment_
自动跳转
curl -L https://hacpai.com/
显示通信过程
curl -v https://github.com
curl --trace output.txt https://github.com
# or
curl --trace-ascii output.txt https://github.com
curl --trace-ascii output.txt --trace-time https://github.com
发送表单信息
curl example.com/api/v1/profile?name=prfect-man
curl -X POST --data "file=xyz" example.com/api/v1/upload
curl -X POST--data-urlencode "date=April 2" example.com/api/v1/timedate
文件上传
# 托管本地文件
curl -F'file=@yourfile.png' https://0x0.st
# 托管线上文件
curl -F'url=http://example.cn/img.jpg' https://0x0.st
调用服务
缩短您指定的 url
curl -F'shorten=https://nicelinks.site' https://0x0.st
获取所在地 ip
curl -L tool.lu/ip
# or
curl -L ip.tool.lu
获取天气预报
curl wttr.in
下载文件并显示下载进度
curl -# -o pretty-gril.jpg https://w.wallhaven.cc/full/9m/wallhaven-9mxjp8.jpg
☞虎牙被抬员工当事人再发声;淘宝回应网店客服“看见”用户未发送内容;Python 3.9.2 发布 | 极客头条
☞Ant Design 被删代码已恢复,现登顶 GitHub Trending Top 2
☞「1s」即可!用 VS Code 一键玩转 GitHub 代码!
关注公众号:拾黑(shiheibook)了解更多
[广告]赞助链接:
四季很好,只要有你,文娱排行榜:https://www.yaopaiming.com/
让资讯触达的更精准有趣:https://www.0xu.cn/
关注网络尖刀微信公众号
随时掌握互联网精彩
随时掌握互联网精彩
赞助链接
排名
热点
搜索指数
- 1 习主席的欧洲时间 4914611
- 2 超大地磁暴来临!新疆现绚丽极光 4996477
- 3 那英 叶赫那拉氏的宿命 4846465
- 4 欢迎晚宴上他们都来了 4747962
- 5 专家建议不要买低价机票 4673000
- 6 三组数据看实体经济发展质效提升 4591564
- 7 专家建议:5天工作制应该进行调整 4462843
- 8 广东街头惊现“线状雨” 4388602
- 9 台湾地震把福州乌塔震歪?假的 4295088
- 10 组织未成年人有偿陪侍9人被判刑 4184293