- 3.3 Multiple URLs in a single command line
-
- A single curl command line may involve one or many URLs. The most common case
- is probably to just use one, but you can specify any amount of URLs. Yes
- any. No limits. You'll then get requests repeated over and over for all the
- given URLs.
-
- Example, send two GETs:
-
- curl http://url1.example.com http://url2.example.com
-
- If you use --data to POST to the URL, using multiple URLs means that you send
- that same POST to all the given URLs.
-
- Example, send two POSTs:
-
- curl --data name=curl http://url1.example.com http://url2.example.com
-
-
- 3.4 Multiple HTTP methods in a single command line
-
- Sometimes you need to operate on several URLs in a single command line and do
- different HTTP methods on each. For this, you'll enjoy the --next option. It
- is basically a separator that separates a bunch of options from the next. All
- the URLs before --next will get the same method and will get all the POST
- data merged into one.
-
- When curl reaches the --next on the command line, it'll sort of reset the
- method and the POST data and allow a new set.
-
- Perhaps this is best shown with a few examples. To send first a HEAD and then
- a GET:
-
- curl -I http://example.com --next http://example.com
-
- To first send a POST and then a GET:
-
- curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html
-
-