Managing string length in a header
CRBasic has a 512-character limit per line. If your string exceeds this limit, you must split it into multiple lines and concatenate them.
If your line exceeds 512 characters, you’ll encounter this CRBasic compiler error:
line 34: Line exceeds max characters of 512.
Error(s) detected in the program. Double-click an error above to navigate to it.
Here is an example of splitting a long header string and concatenating it back together:
httpHeaderl = "Authorization: Bearer"
& CHR
(45) & "ONkU5RERFMjBBMUQONURFNzIONkU5
httpHeader2 = httpHeader & "0NkU5RERFMjBBMUQ0NURFNzIyRTM0NjAlMMtY0NkU5RERFMjBBMUQ
httpHeader3 = httpHeader & "0NkU5RERFMjBBMUQ0NURFNzIyRTM0NjA1M"
& CHR
(45) & "ONkU
FullhttpHeader = httpHeaderl & httpHeader2 & httpHeader3