MATLAB: What’s the MatLab WEBSAVE equivalent of this WGET command

MATLABurlreadwebreadwebsavewget

I can't get websave to work (on Win10, R2020a).
What is the MatLab equivilent of this wget command. Note it uses a proxy and authenticaation.
wget --post-data "identity=MYUSER&password=MYPASS&query=PAGEURL" https://AJAXAUTH_URL -e https_proxy=PROXYIP:PORT -O OUTFILE
The above can be broken into two, to reuse the authentication many times. What is the MatLab equivilent here?
wget --save-cookies=COOKIEPATH AUTHURL --post-data "identity=MYUSER&password=MYPASS" -e https_proxy=PROXYIP:PORT -O nul
wget --load-cookies=COOKIEPATH PAGEURL -e https_proxy=PROXYIP:PORT -O OUTFILE
Thank you

Best Answer

Found my own answer to the single command question, need to use webwrite instead of webread.. very counterintuative!
data = webwrite(AUTHURL,'identity',USERNAME,'password',PASSWORD,'query',PAGEURL);
To use proxy: Home > Prefferences > Web