Borrar filtros
Borrar filtros

Error in URI function

1 visualización (últimos 30 días)
MakM
MakM el 21 de Mzo. de 2022
Comentada: Walter Roberson el 21 de Mzo. de 2022
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 comentario
Walter Roberson
Walter Roberson el 21 de Mzo. de 2022
Which MATLAB release are you using?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Call Web Services from MATLAB Using HTTP en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by