com.HTTPPart.CreateFromString

Creates a new HTTPPart object based on given string.

Syntax

CreateFromString(
   str STRING )
  RETURNS com.HTTPPart
  1. str specifies a string value.

Usage

Creates a new HTTPPart object based on given string. To be used via the addPart() method.

Defaults HTTP multipart headers:
  • Content-Type: text/plain
  • Content-Transfer-Encoding: 8bits

Notice that the string will be converted during request sending into ISO-8859-1 by default, unless a different charset has been set via setHeader(“Content-Type”,”text/plain; charset=UTF-8”) for instance.

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