webread
- :
data =webread(url)¶ - :
data =webread(url, name1, value1, …)¶ - :
data =webread(…, opts)¶ Fetch the resource at url with an HTTP request and return its decoded body.
Pairs of names and values (strings or numbers) become the query string. A
weboptionsobject given last controls the timeout, credentials, extra headers and the conversion of the reply: JSON text turns into structures and arrays, plain text into a character vector, images and audio into numeric arrays and CSV data into a table.When the server cannot be reached the error identifier starts with
MATLAB:webservices:(for exampleUnknownHost,ConnectionRefusedorTimeout); an HTTP status of 400 or above givesMATLAB:webservices:HTTP<code>StatusCodeError.