webread POST query behavior changed between MATLAB R2016b and R2017a
조회 수: 5 (최근 30일)
이전 댓글 표시
Hugo Vega De La Cruz
2017년 3월 27일
댓글: Hugo Vega De La Cruz
2017년 3월 31일
Hello all,
I updated recently to MATLAB R2017a and the behavior of the webread function seems to have changed. I'm trying to get data from a web service using a POST query:
url = 'https://estadisticas.bcrp.gob.pe/estadisticas/series/api/';
options = weboptions('RequestMethod','post','CertificateFilename','');
start_str = '2003-1';
end_str = '2017-2';
series = 'PN00181MM';
webread(url,'series',series,'fechaini',start_str,'fechafin',end_str,'idioma','ing','formato','txt',options);
This works fine in MATLAB R2016b, returning time series data... but MATLAB R2017a seems to be returning a txt version of the webpage found at the url.
I would like to know how to obtain the previous behavior using MATLAB R2017a.
All help would be appreciated!
Best,
Hugo.
댓글 수: 0
채택된 답변
Nagini Venkata Krishna Kumari Palem
2017년 3월 31일
It is recommended to use 'webwrite' instead of 'webread'. For example,
options = weboptions('CertificateFilename','');
webwrite(url,'series',series,'fechaini',start_str,'fechafin',end_str,'idioma','ing','formato','txt',options);
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!