Setting HTTP Headers

Set HTTP headers for the BlackBerry Hybrid Web Container to include authentication tokens.

These sample methods show how to do this in the BlackBerry Hybrid Web Container template source code.
  • setHttpHeaders() – use this method to set the authentication tokens. The tokens you set are used until setHttpHeaders is called again.
  • setWorkflowTokenErrorListener() – use this method to call setHttpHeaders() to put the authentication tokens back in a good state, if, for example, they have expired.
  • setHttpErrorListener() – use this method to handle HTTP errors.

The comment tag associated with setting HTTP headers is BLACKBERRY_CUSTOMIZATION_POINT_HTTPHEADERS.

  1. Open the CustomizationHelper.java file and make your changes.
  2. Save the file.
  3. Rebuild the project.