필터 지우기
필터 지우기

Error in URI function

조회 수: 1 (최근 30일)
MakM
MakM 2022년 3월 21일
댓글: Walter Roberson 2022년 3월 21일
I have the following code.
import matlab.net.*
import matlab.net.http.* %importing in the loop to avoid connection error
import matlab.net.http.io.*
params = {'input' username};
header = HeaderField('accept', '*/*');
uri = URI('http://api.xyz.com/test', QueryParameter(params'));
body = FileProvider();
response = RequestMessage('post', header, body).send(uri.EncodedURI);
but I am getting the following error, what could be the reason, how can I remove this error.
Error using strsplit
Too many input arguments.
Error in matlab.net.URI/set.Path (line 432)
obj.Path = strsplit(string(value), '/', 'CollapseDelimiters', false);
Error in matlab.net.URI/parse (line 1202)
obj.Path = parts.Path;
Error in matlab.net.URI (line 874)
obj = obj.parse(dest, literal);
Error in username_script (line 51)
uri = URI('http://api.xyz.com/test', QueryParameter(params'));
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 3월 21일
Which MATLAB release are you using?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Web Services from MATLAB Using HTTP에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by