I run several times this command
curl -X POST \
-H "X-Primotexto-ApiKey: 784155ceed9d0a4d1ffdb67466" \
-H "Content-Type: application/json" \
-d "$fragment" \
https://api.primotexto.com/v2/notification/messages/send
Is that possible to ask curl to return the HTTP 200 (OK) ?
Thanks
This command
will fetch the header only, redirect the output to /dev/null, silence any progress bars, and eventually print the
http_code
(200).If you instead want to print the content of the website alongside the HTTP returncode, then a simple
--write-out "%{http_code}\n"
will do:Output: