我用一个数据采集模块与web服务器。我想发布一个运行命令开始收购。下面是我的命令错误响应。
> > s_sch = ' http://webdaq316-ae.local/api/v1.0/schedule/status/ ';
> >选项= weboptions (‘ContentType’,‘json’,‘MediaType’,‘application / json’,‘RequestMethod’,‘后’,‘ArrayFormat’, json)
选择=
weboptions属性:
CharacterEncoding:‘汽车’
UserAgent:“MATLAB 9.5.0.944444 (R2018b) '
超时:5
用户名:“
密码:"
KeyName:“
KeyValue:“
ContentType:“json”
ContentReader: []
MediaType:“application / json”
RequestMethod:“文章”
ArrayFormat:“json”
HeaderFields: []
MATLAB CertificateFilename:“C: \ Program Files \ \ R2018b \ sys \ \ ca证书\ rootcerts.pem '
> > apikey =‘真正的’
apikey =
“真正的”
> > json_command =['{“运行”:“apikey,”}”)
json_command =
“{“运行”:真}”
> > start_sch = webwrite (s_sch、json_command选项)
然而,我得到以下错误。
错误使用readContentFromWebService(46行)
服务器返回415状态消息”来响应请求的URL
http://webdaq316-ae.local/api/v1.0/schedule/status/。
错误webwrite(第139行)
[varargout {1: nargout}] = readContentFromWebService(连接,选择);