com.HTTPRequest.setMultipartType

Switch HTTPRequest in multipart mode of given type.

Syntax

setMultipartType(
   type STRING,
   start STRING,
   boundary STRING )
  1. type is 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 type of a same document
    • or any other type
    • NULL: switch multipart mode off
  2. start is the Content-ID value of root multipart document. (optional)
  3. boundary is the string used as multipart boundary. (optional)

Usage

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

Important: Multipart HTTP requests is not supported on GMI mobile devices.

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).