当前位置:网站首页>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

边栏推荐
- Jd.com: how does redis implement inventory deduction? How to prevent oversold?
- 图像PANR
- Leetcode (146) - LRU cache
- Postman assertion
- Wechat applet custom tabbar
- Basic operation of sequence table
- 伯克利、MIT、剑桥、DeepMind等业内大佬线上讲座:迈向安全可靠可控的AI
- Limit summary (under update)
- The Google File System (GFS) learning notes
- [普通物理] 光栅衍射
猜你喜欢
浅谈MySql update会锁定哪些范围的数据

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

二叉树的基本性质与遍历

Camera rental management system based on qt+mysql

Record a deletion bash_ Profile file

Several common command operations in win system

Postman assertion
![[普通物理] 光栅衍射](/img/f3/965ff7cd3bb76b4f71b69b9d12ece3.png)
[普通物理] 光栅衍射

Variable setting in postman

A/b test helps the growth of game business
随机推荐
JUnit unit test
I just purchased a MySQL database and prompted that there are already instances. The console login instance needs to provide a database account. How do I know the database account.
Several common command operations in win system
Difference between map and object
Byte and Tencent have also come to an end. How fragrant is this business of "making 30million yuan a month"?
基于QT+MySQL的相机租赁管理系统
Learn to use a new technology quickly
How to apply agile development ideas to other work
Format method and parse method of dateformat class
顺序栈1.0版本
顺序表的基本操作
More than ten years' work experience is recommended at the bottom of the box: how much does it cost to find a job? See here! Brothers and sisters are recommended to collect and pay attention
The latest simulated question bank and answers of the eight members (Electrical constructors) of Sichuan architecture in 2022
The Google File System (GFS) learning notes
Leetcode(455)——分发饼干
Mr. Hu Bo, CIO of weiduomei, a scientific innovator: digitalization is a bloodless revolution, and the correct answer lies in the field of business
畅直播|针对直播痛点的关键技术解析
Berkeley, MIT, Cambridge, deepmind and other industry leaders' online lectures: towards safe, reliable and controllable AI
顺序栈遍历二叉树
After 5 months' test, it took 15K to come for an interview. When I asked, it was not worth even 5K. It was really