com.HTTPPart.CreateFromData

Creates a new HTTPPart object based on given BYTE located in memory.

Syntax

CreateFromData(
   b BYTE)
  RETURNING part-object com.HTTPPart
  1. b is a BYTE object located in memory.

Usage

Creates a new HTTPPart object based on given BYTE located in memory. To be used via the addPart() method.

Defaults HTTP headers:
  • Content-Type: application/octet-stream
  • Content-Transfer-Encoding: base64

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