Webwrite
Write data to RESTful web service
Syntax
描述
将内容写入指定的Web服务response
= webwrite(URL
,Postname1,PostValue1,...,Postnamen,PostValuen
)URL
并返回response
。输入参数Postname1,PostValue1,...,Postnamen,PostValuen
specify the content as name-value pairs.Webwrite
形式编码HTTP POST请求的主体中的名称值对。Web服务定义response
。
The web service provides a安息that returns data formatted as an internet media type such as JSON, XML, image, or text.
添加其他HTTP请求选项,由response
= webwrite(___,选项
)weboptions
object选项
。您可以将此语法与先前语法的任何输入参数一起使用。
将内容写为互联网媒体类型以外的其他编码字符阵列('应用程序/x-www-form-urlenCoded'
),指定MediaType
财产的选项
。
To request data with an HTTP POST request and read the response with a function, specify theContentReader
财产的选项
作为功能的手柄。如果指定返回多个输出参数的函数的句柄,Webwrite
returns all output arguments.
例子
输入参数
Output Arguments
More About
提示
有关RESTFUL Web服务功能不支持的功金宝app能,请参见Use HTTP with MATLAB。
The
Webwrite
function writes帖子,后值
输入参数作为形式编码的字符阵列。如果您还指定选项
输入参数,然后MediaType
property must be'应用程序/x-www-form-urlenCoded'
。Webwrite
无法转换约会时间
objects to JSON, because JSON does not define a standard date format.Webwrite
always puts帖子,后值
query parameters into the body of the message regardless of the value of theRequestMethod
财产的选项
。要指定代理服务器设置,请参阅Proxy Server Authentication。