Open topic with navigation
The body of a request is passed as the value of the attribute arguments Body, BodyBinary, or BodyUnicode, depending on the content. The body can be a single argument, or partitioned into multiple body segments,that is, a series of arguments. For example, the following call to web_custom_request partitions the body into three segments: a unicode section, followed by a binary section, followed by regular text. The final body is the result of all three sections concatenated together in the same order as they are passed to the function.
The deprecated web_custom_request parameter, Binary, can also be used to indicate a binary body, but only if a single Body segment is passed to the function.
All body values are ASCII, null–terminated strings.
Body – indicates regular, printable text. Null bytes cannot be represented (except see note below). All characters are specified with a backslash.
Note: In older scripts, you may see non–printable characters encoded within a Body argument in hexadecimal code (e.g., "\\x5c") in which case "Binary=1" must also be passed as a parameter. NULL bytes can be represented in this way ("\\00"). In contrast, newer scripts partition the body into multiple body segments e.g., "Body=...", "BodyBinary=...", Body=...".
BodyBinary – indicates binary code. Non–printable characters are encoded in hexadecimal in the form \\xHH, where HH specifies the hexadecimal value. NULL bytes are specified by "\\00"
BodyUnicode – US–English, specifically Latin1 UTF–16LE (little–endian) Unicode only. The actual parameter is stripped of the extra zero byte appending each character to enable easier reading of the text. It is re–appended by web_custom_request before sending to the Web server.
For non–printable characters use a single backslash. Null bytes cannot be represented.
Note: For a body whose length is over 100K, a variable name appears instead of the attribute. The variable is defined in lrw_custom_body.h.