MATLAB® provides programmatic interfaces to these Web service interfaces.
RESTful (Representational state transfer)—Use the webread
, webwrite
, and websave
functions in Web Access to read content from
RESTful Web services.
HTTP (Hypertext Transfer Protocol)—Use the HTTP Interface API to implement advanced HTTP messaging semantics.
To authenticate to a server, see Server Authentication.
MATLAB supports Basic, Digest, and NTLM proxy authentication types. To specify proxy server settings, choose one of these:
If you specify the values using Web preferences, then MATLAB ignores system settings.
MATLAB supports Basic, Digest, and NTLM proxy authentication types. To specify proxy server settings, choose one of these:
If you specify a ProxyURI in a
matlab.net.http.HTTPOptions
object, then set the Username and Password properties in Credentials.
MATLAB chooses the first setting in this list.
You can specify proxy server settings using MATLAB Web Preferences.
Note
Settings in Web Preferences override system settings.
To specify the proxy server settings:
On the Home tab, in the Environment section, click Preferences. Select MATLAB > Web.
Select the Use a proxy server to connect to the Internet check box.
Specify values for Proxy host and Proxy port.
Examples of acceptable formats for the host are: 172.16.10.8
and ourproxy
. For the port, enter an integer only, such as 22
. If you do not know the values for your proxy server, ask your system or network administrator for the information.
If your proxy server requires a user name and password, select the Use a proxy with authentication check box. Then enter your proxy user name and password.
Ensure that your settings work by clicking the Test connection button.
MATLAB attempts to connect to https://www.mathworks.com
:
If MATLAB can access the Internet, Success! appears next to the button.
If MATLAB cannot access the Internet, Failed! appears next to the button. Correct the values you entered and try again. If you still cannot connect, try using the values you used when you authenticated your MATLAB license.
Click OK to accept the changes.
Restart MATLAB to enable the changes.
If no proxy is specified in MATLAB Web preferences, then MATLAB uses the proxy set in the operating system preferences.
Operating System | System Certs |
---|---|
Windows® | Windows Certificate Store |
macOS | macOS KeyChain |
Linux® | Environment variables |
To specify proxy server settings in system preferences, refer to your Windows, Linux, or macOS operating system documentation.
MATLAB does not take into account proxy exceptions which you configure in Windows.
matlab.net.http.Credentials
| matlab.net.http.HTTPOptions