Download files from https server using username and password
조회 수: 23 (최근 30일)
이전 댓글 표시
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
채택된 답변
Rik
2021년 8월 12일
You should be able to use websave. You can provide a username and password in weboptions:
weboptions
댓글 수: 8
Patrik Brigant
2022년 4월 1일
@Andre Ferreira Hi, are you using GAMP II aswell or did you solved the issue using Matlab? Thank you :)
추가 답변 (1개)
Yongjian Feng
2021년 8월 12일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Web Services에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!