How do I preemptively include a Basic Authentication header when working with webread/webwrite/websave?
显示 更早的评论
I have a web server which allows Basic authentication for non-interactive workflows and which supports a form based login plus cookies for interactive workflows. This means that:
1. If I make a request with a valid Basic Authentication header, the request simply succeeds, and
2. If I make a request without any Authentication header, the server redirects to the login form, i.e. it does not respond with 401 and a WWW-Authenticate header specifying which authorization methods it supports.
In MATLAB releases prior to R2019b, I could successfully work with this server using "webread" and passing along "weboptions" in which I specified 'Username' and 'Password', I got the response which I was expecting. In MATLAB R2019b making the same request returns the login page however instead of the data which I was expecting.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!