当前位置:网站首页>Curl command
Curl command
2022-06-24 21:05:00 【gchh_ spring】
Common use
url=http://www.baidu.com
get request :curl $url
post request :curl -d 'xxx' $url
proxy Proxy usage :curl -x 'http://127.0.0.1:8080' $url
Important parameter
-H 'Connection: keep-alive' Header settings , It's very important
-u username:password Parameters of user authentication
-d To send post data ,@file Means from a file
--data-urlencode 'page_size=50' Carry on the content url code
-G hold data Data as get The requested parameters are sent , Often with --data-urlencode Use a combination of
-o Writing documents , Usually used to download
-x agent ,http agent ,socks5 agent
-v verbose Print more detailed logs
-s Turn off some prompt output
--help see curl Order help
curl 'https://xueqiu.com/stock/search.json?code=sogo&size=3&page=1' -H 'Connection: keep-alive' -H 'Accept: application/json, text/plain, */*' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36' -H 'elastic-apm-traceparent: 00-454a2f883abee43dbd62d61885d2b6ec-b1a2ea3fbdd5d8d3-00' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Dest: empty' -H 'Referer: https://xueqiu.com/k?q=sogo' -H 'Accept-Language: zh-CN,zh;q=0.9' -H 'Cookie: acw_tc=2760820516120000169756351e1ee0767f63618114de523bfe204cf47b3e98; xq_a_token=176b14b3953a7c8a2ae4e4fae4c848decc03a883; xqat=176b14b3953a7c8a2ae4e4fae4c848decc03a883; xq_r_token=2c9b0faa98159f39fa3f96606a9498edb9ddac60; xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOi0xLCJpc3MiOiJ1YyIsImV4cCI6MTYxMzQ0MzE3MSwiY3RtIjoxNjExOTk5OTcyODExLCJjaWQiOiJkOWQwbjRBWnVwIn0.pVz6h0zWljAt_yGCB6Ikx1RS5bb5oZXWvGfzt79SPtgxzwy1N_4OEG3o-2Y9QHTl7TIQ5mPjfAyaCGY_5YpiVVVz1hy1aWGPaqsHyWL6tgk11g7sF5bnc5-q43sWFjYZkSsulw_fgv9QfpuYPLyfi2UAGnb7yS3lKlsXWgleRcqcUGM07EKs62AGSbLBoCLH1lGqbOPIKUZuxSSdjBvU_kxWEH7nG-6E-GmwRE1pUcNzXQ7z99Ol51bm0jhz-xFLpmxy2IMhOiWuw4DZd0t4u-RtkkKoKDuOCDdwjmDY0G98petPv3EfHGTKyfvJx750rTvum3FTbmu9O4MFiJ_b3A; u=661612000016976; Hm_lvt_1db88642e346389874251b5a1eded6e3=1612000026; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1612000026; device_id=24700f9f1986800ab4fcc880530dd0ed' --compressed |jqstay curl Use pipe and after command jq command , The returned information obtained can be json format

边栏推荐
- Leetcode (135) - distribute candy
- Two fellow countrymen from Hunan have jointly launched a 10 billion yuan IPO
- The difference between RPC and restful
- Map跟object 的区别
- The AI for emotion recognition was "harbouring evil intentions", and Microsoft decided to block it!
- Material management system based on SSM (source code + document + database)
- Apple doesn't need money, but it has no confidence in its content
- "Ningwang" was sold and bought at the same time, and Hillhouse capital has cashed in billions by "selling high and absorbing low"
- Vant component used in wechat applet
- Nifi quick installation (stand-alone / cluster)
猜你喜欢

虚拟化是什么意思?包含哪些技术?与私有云有什么区别?

Intermediary model -- collaboration among departments

伯克利、MIT、劍橋、DeepMind等業內大佬線上講座:邁向安全可靠可控的AI

Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading

传统的IO存在什么问题?为什么引入零拷贝的?

Agency mode -- Jiangnan leather shoes factory

JMeter parameterization

Berkeley, MIT, Cambridge, deepmind and other industry leaders' online lectures: towards safe, reliable and controllable AI

Create a multithreaded thread class

Dongyuhui is not enough to bring goods to "rescue" live broadcast
随机推荐
基于QT+MySQL的相机租赁管理系统
After 5 months' test, it took 15K to come for an interview. When I asked, it was not worth even 5K. It was really
Byte and Tencent have also come to an end. How fragrant is this business of "making 30million yuan a month"?
Image panr
Second understanding permutation and combination
Steps of JMeter performance test
JMeter installation plug-in, adding [email protected] -Perfmon metric collector listener steps
传统的IO存在什么问题?为什么引入零拷贝的?
Packaging_ Conversion between basic type and string type
Network security review office starts network security review on HowNet
Common data model (updating)
Postman assertion
Leetcode(455)——分发饼干
全上链哈希游戏dapp系统定制(方案设计)
伯克利、MIT、劍橋、DeepMind等業內大佬線上講座:邁向安全可靠可控的AI
Analysis of errors in JSON conversion using objectmapper
Talking about the range of data that MySQL update will lock
Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
yeb_ Back first day
[普通物理] 光栅衍射