websave
Save content from RESTful web service to file
Syntax
Description
outfilename = websave(
appends query parameters tofilename
,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 theoptions
)weboptions
objectoptions
. 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 theRequestMethod
property ofoptions
as的帖子'
. Many web services provide both GET and POST methods to request data.
Examples
Input Arguments
More About
Tips
For functionality not supported by the RESTful web services functions, see theUse HTTP with MATLAB.
For HTTP POST requests, the
websave
function supports only theapplication/x-www-form-urlencoded
media type. To send a POST request with content of any other internet media type, usewebwrite
.To specify proxy server settings, seeProxy Server Authentication.