I am looking at the RPG parameter definitions for HTTP_req()
Response data can be returned either to an IFS file, or via the 16MBm ResultStr parameter. ResultStr is defined as *varsize, so it will accept a smaller variable in that parameter.
System API's that do similar usually have a separate length parameter to define how long the variable actually is, so that the API does not read/write past the end. But HTTP_req() does not have a length parameter
My question then, is how does HTTPAPI know how long the parameter actually is so it doesn't write past the end? Or does it not know, and it relies on the developer using a variable large enough to handle any possible response value?
Response data can be returned either to an IFS file, or via the 16MBm ResultStr parameter. ResultStr is defined as *varsize, so it will accept a smaller variable in that parameter.
System API's that do similar usually have a separate length parameter to define how long the variable actually is, so that the API does not read/write past the end. But HTTP_req() does not have a length parameter
My question then, is how does HTTPAPI know how long the parameter actually is so it doesn't write past the end? Or does it not know, and it relies on the developer using a variable large enough to handle any possible response value?
Comment