Download files from https server using username and password
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
sermet OGUTCU
el 12 de Ag. de 2021
Comentada: weiyong yi
el 28 de Jun. de 2023
url = 'https://cddis.nasa.gov/archive/gnss/products/0971/';
In this https server, I need to download "cod09710.eph.Z" file for a specific location in my computer. How I can download this file using username and password related to this https server?
0 comentarios
Respuesta aceptada
Rik
el 12 de Ag. de 2021
You should be able to use websave. You can provide a username and password in weboptions:
weboptions
8 comentarios
Patrik Brigant
el 1 de Abr. de 2022
@Andre Ferreira Hi, are you using GAMP II aswell or did you solved the issue using Matlab? Thank you :)
Más respuestas (1)
Yongjian Feng
el 12 de Ag. de 2021
Try this:
username = 'Your username here';
password = 'Your password here';
authStr = [username ':' password];
base64Str = ['Basic ' matlab.net.base64encode(authStr)];
headers = {'Authorization': base64Str};
options = weboptions('HeaderFields',headers);
webread('http://ip.jsontest.com', options)
7 comentarios
weiyong yi
el 28 de Jun. de 2023
Doesn't work on my PC at all. Do you have any further ideas?
thank you.
Ver también
Categorías
Más información sobre Web Services en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!