addHttpHeader

addHttpHeader(key:   String;
              value: String);

The addHttpHeader method of the JadeWebServiceConsumer class enables you to add, change, or remove HTTP headers from a Web service consumer request.

The value of the key parameter is the HTTP header to create and the value of the value parameter is the value to assign to that key.

In the following code fragment, the Authorization: Basic c29hcHRlc3Q6cGFzc3dvcmQ=\r\n header is added to a request message sent to a Web service provider.

webService.addHttpHeader("Authorization",
                         "Basic c29hcHRlc3Q6cGFzc3dvcmQ=\r\n");

The following example shows the removal of an HTTP header with a key of Authorization.

webService.addHttpHeader("Authorization", "");

The framework creates and passes the HTTP headers to the underlying libraries (wininet.dll and winhttp.dll) that you specified and does not attempt to validate their accuracy. It is your responsibility to ensure that the HTTP headers are valid.