Using curl to make requests.
while true; do printf '\n' | nc -l localhost 8000; done
make; make curls
- If one does not specify
-H "Content-Type:application/json",curlsends it in as-H "Content-Type:application/x-www-form-urlencoded" - If you have
-H "Content-Type:application/json", there's no need to add-X POST - If you have
-d, there's not need to add-X POST - Add
-H "Content-Type:application/json"in a statement containing-d, if you want the server to receive your request asContent-Type:application/json
I found this link useful