Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

urlwrite instruction for Matlab 2013b

1 vue (au cours des 30 derniers jours)
buer
buer le 5 Fév 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi,
Can anyone explain to me how to use urlwrite function in 2013b version? With the suthentication parameters also. I want to download some files which are linked through some url with http authentication. But my problem is that I can not find a good document about the parameters for urlwrite together with authentication.
URL = 'http://csa.esac.esa.int/csa/aio/product-action';
fileName = tempname;
gzFileName = [fileName '.gz'];
[gzFileName,st] = urlwrite(URL,gzFileName, 'Authentication', 'Basic', ...
'Get', {'Username', '<username>', 'password', '<password>', ...
'DATASET_ID', 'C1_CP_WHI_ELECTRON_DENSITY', 'START_DATE', ...
'2011-11-10T18:00:00Z', 'END_DATE', '2011-11-10T21:00:00Z', ...
'NON_BROWSER', '1'});
gunzip(gzFileName);
fileNames = untar(fileName);
for iFile = 1:numel(fileNames)
disp(fileNames{iFile});
end
here is one example, but I do not know what is the meaning of all those: DATASET_ID', 'C1_CP_WHI_ELECTRON_DENSITY', 'START_DATE', ... '2011-11-10T18:00:00Z', 'END_DATE', '2011-11-10T21:00:00Z', ... 'NON_BROWSER', '1'}
Can anyone help me with this? I believe the urlwrite in 2013b has the authentication function right? Thanks in advance

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by