I am trying to download a https page using url read:
str=urlread('https://funds.barclaysstockbrokers.co.uk/clients/bsl/search_factsheet_summary.aspx?code=B0XWN14')
Unfortunately, I get an error :
Error downloading URL. Your network connection may be down or your proxy settings improperly configured.
I tried using urlread2 (http://www.mathworks.co.uk/matlabcentral/fileexchange/35693-urlread2/content/urlread2.m)
but that gives me this error:
Response stream is undefined
below is a Java Error dump (truncated):
??? Error using ==> urlread2 at 217
Java exception occurred:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
What do I need to do?
It is a certificate security trust issue.
I tried the same command in Mathematica, and got this nice looking pop-up window asking me if I want to accept the certificate
When I clicked on accept for this session only, then I got the data OK
I do not use urlread(). But at least now you know why. I do not see options in urlread to do the above. May be you need another API in Matlab to do what you want. May be something at matlab file exchange might handle this.