In this short article, we show how to capture curl output to a file..
2. Capture curl output to a file using
-o, --output <file> parameter
If we use the
-o parameter curl will write output to
<file> instead of stdout.
The following command will write output to a
3. Save request output to a file using
For a single file we could use just
-O param instead of
In this approach, the last segment of the URL path will be used as the filename.
In this short article, we presented how to capture the output of curl request into a file.