Skip to content

websave

web · scripts/web/websave.m

: filename = websave (filename, url)
: filename = websave (filename, url, name1, value1, …)
: filename = websave (filename, url, options)

Save content from a RESTful web service to a file.

Download the resource at url and write the response body to filename. Optional query parameters may be passed as name/value pairs. A weboptions object may be supplied as the final argument; HeaderFields, credentials, Timeout, UserAgent and RequestMethod are honoured. The body is written as received (not decoded as JSON or text).

When the server cannot be reached the error identifier starts with MATLAB:webservices: (matching webread / webwrite).