WRK的使用-lua腳本POST請求(靜態數據)
HTTP_prot = { "/gateway/services", "/gateway/services", } --接口類型 HTTP_type = { "POST", "POST ...
引言 wrk的命令行參數只能發送類似於get delete這種不在請求體中帶參數的http請求,如果要發送post這類請求,必須要寫Lua腳本。由於wrk具有內置的LuaJIT 用於Lua的即時編譯器 ,可以使用Lua腳本進行擴展。 也不必擔心沒學過Lua不會寫腳本,Lua的可讀性很強,類似於Python。通過下面簡單的示例,完全可以模仿出一個更高級的腳本,況且官方也寫了好幾個模板供我們使用。 ...
2021-01-31 16:44 0 297 推薦指數:
HTTP_prot = { "/gateway/services", "/gateway/services", } --接口類型 HTTP_type = { "POST", "POST ...
...
...
或者: 此方法需要一些jar包的支持 https://download.csdn.net/download/qq_35792159/10301873 ...
curl curl http://127.0.2.1:5353/user/get_macro_data -X POST -d '{"num": "7"}' --header "Content-Type: application/json" ...
public static void postNewComment(Context context,final UserAccount userAccount,final String comm ...
...