Raw Body Attribute

Binary content can be sent in the request using the BodyBinary attribute. However, this method requires that content is converted into ASCII text using escape backslashes for non–printable text.

For a simpler representation, use the Raw Body attribute instead. Raw Body enables you to pass a pointer to the binary content.

The syntax for sending raw body content is a set of 4 arguments to web_custom_request. They must appear in the following order:

  1. RAW_BODY_START,
  2. a pointer to the data buffer,
  3. (int) length,
  4. RAW_BODY_END

The syntax is illustrated in the following example:

char *pRD= .../* a pointer to the raw data */

web_custom_request("StepName",

     "URL=http://some.url ",

     "Method=POST",

     RAW_BODY_START,

     pRD,

     3,

     RAW_BODY_END,

     LAST);

The pointer data buffer must not be NULL, even when the length is 0.

The data buffer cannot be parameterized. That is, any parameter reference (for example, "{MyParam}") in the data buffer will not be substituted with the corresponding parameter value. It will be used as a character literal containing braces.