Test REST API with wget
1 min readAug 4, 2020
Besides curl we can use wget command to test our REST API.
Send GET query:
wget 127.0.0.1:5000
Send POST query:
wget --post-data 'url=https://habr.com/ru/post/307140/' 127.0.0.1:5000
Send POST query with params saved in params.txt file
wget --post-file params.txt 127.0.0.1:5000
This will save result in index.html. If you want to output result to terminal use command:
wget -O - -q --post-file params.txt 127.0.0.1:5000