Vitaliy is an Avid Commentator
136 published comments for 2022
User bio
404 bio not found
Member since Apr 14, 2022

Is there any harm in putting in a massive number into the len parameter of the Read() method?

You cannot read more than 3641144 characters from a stream to a string, as this is the limit for long strings: String Length Limit

From the documentation for the Read() method:

If no len is passed in, ie. 'Read()' then it is up to the Read implementation as to
how much data to return. Some stream classes use this to optimize the amount of
data returned to align this with the underlying storage of the stream.

So you can write like this:
Set inMsg %request.Content.Read($$$MaxLocalLength)

Macros are defined in

#define MaxStringLength 3641144
#define MaxLocalLength $zutil(96,39)
Vitaliy has not followed anybody yet.
Global Masters badges:
Vitaliy has no Global Masters badges yet.