save
Last updated
Was this helpful?
Last updated
Was this helpful?
The save
statement is used to write the contents of a to disk.
save
{buffer_name}
as
filename
The save
statement will write the contents of a to filename. As well as providing a means of direct-to-disk downloading this can be useful for retrieving server responses and capturing them for later examination, whether it be for analysis, debugging or audit purposes.
If the destination file already exists then it will be overwritten.
If the filename argument contains a path component, then any directories not present in the path will be created. If creation of the path destination file is not successful then an error will be logged and the USE script will fail.
The save
statement is similar in effect to the option supported by , in that data from a server is written to disk. There is one important distinction however:
When has been used to specify a file to save, the next request will stream data to the file as it is received from the server
When a statement is used to capture the server response, and a subsequent save
statement is used to write it to disk, all the buffered data will be written to the file immediately