Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To save the curl response in a bash script, you can use redirection to write the output to a file. For example:

curl https://example.com/api/foo -o response.json

This will save the response of the curl request to a file named 'response.json'. You can specify any file name or path to save the response to a specific location.