added this part of code in Connect-REST Invoke step 5 , but experiencing NULL pointer exception.
com.pega.apache.http.impl.client.DefaultHttpClient client = new com.pega.apache.http.impl.client.DefaultHttpClient();
com.pega.apache.http.client.methods.HttpPost post = new com.pega.apache.http.client.methods.HttpPost();
java.util.List list = new java.util.ArrayList();
Each Method on the Request tab of the Connect-REST ruleform provides an opportunity to map Constants - or Clipboard data from your service page - to your REST request. The below screenshot is from an 8.4 Connect-REST rule that ships with Pega FFS.
So long as the step page of your Connect-REST call holds the value you want to use for your Header, it can be mapped into Headers the same as Query String or Message Body data.
Connect-REST rules also take Parameters that could be used for this purpose.
Sounds like a good "Idea" for an extension point. It would be good if there was a Data Transform implemented on an Applies To class that all your Connect-REST rules inherit from where you could map in "standard" headers that should be applied to all subclasses' Connect-REST rules.
Use the Share an Idea button above to submit this for consideration!