Save content from RESTful web service to file
outfilename = websave(
saves
content from the web service specified by filename
,url
)url
and
writes it to filename
. The websave
function
returns the full filename path as outfilename
.
The web service provides a RESTful API that returns data formatted as an internet media type such as JSON, XML, image, or text.
outfilename = websave(
appends
query parameters to filename
,url
,QueryName1,QueryValue1,...,QueryNameN,QueryValueN
)url
, as specified by one or
more pairs of name-value arguments. The web service defines the query
parameters.
outfilename = websave(___,
adds
other HTTP request options, specified by the options
)weboptions
object options
.
You can use this syntax with any of the input arguments of the previous
syntaxes.
websave
supports
HTTP GET and POST methods. To send an HTTP POST request, specify the RequestMethod
property
of options
as 'post'
. Many web
services provide both GET and POST methods to request data.
datetime
| weboptions
| webread
| webwrite