Page 1 of 1

Chunk size

Posted: Mon Nov 17, 2025 11:36 am
by twisteddisco
Hi All,

I have written a program that will receive a large response from a web service call using the following HTTP_REQ with the results going back into a Stream file in the IFS.

Code: Select all

rc = http_req( 'GET'                                    // Type                 
              : wResultUrl                              // Url                  
              : %Trimr(wResultsFile)                    // Result Stmf          
              : ResultStr                               // String to receive    
              : *omit                                   // Send Stmf            
              : *omit);                                 // Send String          
One thing I have noticed looking at the log is the word "Chunking"

Code: Select all

HTTPAPI Ver 1.49 released 2024-04-16
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R5M0

http_setauth(): entered
New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819. ProtLoc=0
http_persist_open(): entered
http_long_ParseURL(): entered

etc...

SetError() £13: HTTP/1.1 200 OK
recvresp(): end with 200
recvdoc parms: chunked 0
recvchunk(): entered
get_chunk_size(): entered
7937

chunk size = 31031
get_chunk_size returned 31031
calling comm_blockread

etc... Data received (Hidden)
get_chunk_size(): entered
0

chunk size = 0
get_chunk_size returned 0
http_close(): entered
HTTPAPI Ver 1.49 released 2024-04-16
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R5M0

http_setauth(): entered
Looking on the internet to see what this actually means I found this link which mentions upgrading the HTTPAPI, is this correct still?
Having never upgraded before if this is needed, are there any special requirements in re compiling etc?

Thanks All

https://archive.midrange.com/rpg400-l/ ... 0032.html

Re: Chunk size

Posted: Mon Nov 17, 2025 10:55 pm
by Scott Klement
What problem are you trying to solve?