I make a post request from url like this
curl -s -X POST http://site.com -d "data:data"
The thing is that I want to set a timeout for the url I am sending the post request to.
-m 5, but then it doesn't make the request at all.
Haha, thanks :) (Wild guess comment to answer conversion below)
Just to be sure: The way you format your command in the example suggests you have tried adding the
-m 5 between
-X -m 5 POST). It needs to be
-X POST because
POST is the argument to
-X. Have you tried
curl -s -m 5 -X POST http://site.com -d "data:data"?