com.HTTPRequest.setMultipartType

Switch HTTPRequest in multipart mode of a given type.

Syntax

setMultipartType(
   type STRING,
   start STRING,
   boundary STRING )
  1. type defines one of the following:
    • form-data: Browser Xform with attachment
    • mixed: Parts are independent
    • related: Parts are dependent (Required for SOAP)
    • alternative: Parts are different types of the same document
    • or any other type
    • NULL: switch multipart mode off
  2. start defines the Content-ID value of root multipart document. (optional)
  3. boundary defines a string used as multipart boundary. (optional)

Usage

Switch HTTPRequest in multipart mode of a given type. Calling one of the standard request methods will send the HTTP request as the given multipart type, even if no other part has been set.

The root HTTP part is the part handled via the standard HTTPRequest methods such as doTextRequest(), doXmlRequest(), doDataRequest() and beginXmlRequest().

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).