Is it possible to create HTTP requests using MATLAB?

Is it possible to create HTTP requests using MATLAB?

I'm particularly interested in the way to make a request and save the response as a new variable.

+3
source share
2 answers

Try to start with the functions urlreadand web.

+3
source

urlread will make an HTTP request to any URL and return the results as a char array.

For instance:

>> s = urlread('http://www.mathworks.com');
>> whos s
  Name      Size               Bytes  Class    Attributes

  s         1x23346            46692  char               

Depending on what you want to extract as a variable, you may have to continue processing the result using functions such as regexpand str2double.

+1
source

Source: https://habr.com/ru/post/1746415/


All Articles