How to use the GET of the apache bench stress testing tool POST to stress test and define header and json
This article shows you how to use the GET of the apache bench stress testing tool POST to stress test and define header and json. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
A single curl test that requires time is as follows:
Time curl http://xxxxx/hq/restapi/isStart
Curl is used to use post requests with header and request content
Time curl-X POST-H "Content-Type: application/json"-H "Cache-Control: no-cache"-H "Postman-Token: d63xxx-xxxx-xxxxf450"-d'{"lsock": [{"akcolde": "600000", "marketType": "BB"}]}'"http://xxxxxx/hq/restapi/ime"
Use ab to do it.
Ab-n 100000-c 500 http://xxx/hq/restapi/isdrtab-n 10000-c 100-p "post.txt"-T "application/json"-H "Content-Type: application/json"-H "Cache-Control: no-cache"-H "Postman-Token: d6xxs-sdf-sdf09d"http://cnxxx81/hq/restapi/queryRealTime"
Post.txt
{"lstStock": [{"sterode": "600000", "madfpe": "SH"}]}
The above content is how to use the GET of the apache bench stress tool POST to stress test and define header and json. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.