Page 1 of 1

error MCH1210 in HTTPAPIR4 Len = -1

Posted: Thu Nov 06, 2025 11:14 pm
by juan11de14
Hi,
I access the command line and consume a service without any problems as follows:
response = http_string( 'POST': URL: SOAP: 'text/xml')
But if I do it this way, by first making a post:
data-gen reqds %data(request) %gen('YAJLDTAGEN')
response = http_string('POST':url:request:'application/json');
Next in other program
response = http_string( 'POST': URL: SOAP: 'text/xml')
and it shows me the error MCH1210 en HTTPAPIR4 ( %len(resultstr) = Len;)
because Len = -1.
What caused this error?

Re: error MCH1210 in HTTPAPIR4 Len = -1

Posted: Fri Nov 07, 2025 3:42 pm
by ronny45
I'd recommend first setting debug options before calling http_string:

Code: Select all

http_debug(*on: '/tmp/httpdebug.txt');
and review the log written int text file.

Re: error MCH1210 in HTTPAPIR4 Len = -1

Posted: Fri Nov 07, 2025 6:29 pm
by Scott Klement
Are you up-to-date on HTTPAPI? There was a bug like this a couple of years ago...

If you are already running version 1.52 of HTTPAPI and still receiving this error, please tell us how to reproduce the problem on our machines.