帮助中心帮助中心
类: matlab.net.http.AuthInfo 命名空间: matlab.net.http
设置 AuthInfo 参数的值
newinfo = setParameter(authinfo,name,value)
newinfo = setParameter(authinfo,name,value) 设置参数 name 的 value,并返回修改后的 AuthInfo 对象。如果某个参数不存在,此方法将添加该参数。
newinfo
authinfo
name
value
AuthInfo
如果您使用此方法设置 Scheme 属性的值,此方法将更改属性值,而不是添加一个 Scheme 参数。要设置 Scheme,请键入 obj.Scheme = value。
Scheme
obj.Scheme = value
如果您有一个名为 Encoded 的参数,则它必须是此对象中的唯一参数。此用法仅适用于 AuthorizationField 对象。
Encoded
AuthorizationField
全部展开
matlab.net.http.AuthInfo
AuthInfo,指定为 matlab.net.http.AuthInfo 对象。
参数名称,指定为字符串或字符向量。
名称匹配不区分大小写,但 value 区分大小写。如果 name 与某个现有参数匹配,但大小写不同,则该参数名称将更改为指定 name 的大小写。
参数值,指定为字符串、字符向量、具有 string 或 char 方法的任何类型,或者 name 支持的类型。
不要用双引号将值引起来,也不要插入任何转义字符。当您在 AuthenticateField、AuthenticationInfoField 或 AuthorizationField 对象中插入此 AuthInfo 对象时,值将被转换为字符串,并根据需要自动插入引号和转义字符。如果 value 是一个字符串数组或字符向量元胞数组,则各成员之间将用空格隔开。
AuthenticateField
AuthenticationInfoField
更新后的参数值,返回为该参数设置的任何类型。如果 value 为 [],则 setParameter 并不会更改 name 参数的值。但是,如果 value 是一个空字符向量或字符串,此方法会将 value 设置为空字符串。
[]
setParameter
在 R2016b 中推出
matlab.net.http.field.AuthenticateField | matlab.net.http.field.AuthenticationInfoField | matlab.net.http.field.AuthorizationField
matlab.net.http.field.AuthenticateField
matlab.net.http.field.AuthenticationInfoField
matlab.net.http.field.AuthorizationField
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office