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