com.HTTPPart.removeHeader

Remove the header of given name from the current HTTPPart object.

Syntax

removeHeader(
   name STRING )
  1. name is the name of the header to remove.

Usage

With an HTTP multipart object, the "Content-Type" header may be optional for each part:

https://tools.abc.org/html/rfc1234#section-1.1

A request might be rejected by some providers if the "Content-Type" header is set for a part. This method allows you to remove headers from an HTTPPart object based on the header name.

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

Example

CALL req.removeHeader("Content-Type")