urlread(), urlwrite() don't work for https pages in Octave for Windows

北城余情 提交于 2019-12-01 18:32:47

I have the same probem using urlread() in Octave 4.0.0 for Windows. I tried a few things but none worked. I did manage to get the curl command line tool to work tho. So in the end the easiest thing for me was to write my own urlread() which called curl using Octave's system() function:

function retval=my_urlread(url) command=['curl --silent ','"',url,'"']; [output,text]=system(command); retval=text; endfunction

I analyzed source code of CURL and can say: you can't solve this without source editing. CURL has two entrance points: if you run curl.exe it setup libcurl with environment variables and files from working dir, and if you're using libcurl through curl_easy_perform from libcurl.dll (like Octave), you must provide all settings manually. So you can setup your environment such way, that curl.exe from Octave's binary dir will load data without additional parameters (curl.exe https://google.com), but Octave's urlread will not work.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!