The problem is your assumption that the data should be part of the header, because it shouldn't. If I run the sample request from the API through a random webproxy, I can see the following headers:
POST /ReactomeRESTfulAPI/RESTfulWS/queryHitPathways HTTP/1.1
Host reactomews.oicr.on.ca:8080
Content-Length 41
Accept application/json
Origin http://reactomews.oicr.on.ca:8080
User-Agent Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Content-type text/plain
Referer http://reactomews.oicr.on.ca:8080/ReactomeRESTfulAPI/ReactomeRESTFulAPI.html
Accept-Encoding gzip,deflate,sdch
Accept-Language nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.3
In other words: none of the "PPP2R1A,CEP192,AKAP9,CENPJ,CEP290,DYNC1H1"
strings are there. In stead, that data is part of the post body, or the 'entity' that you can set to the post method.
Something like this should probably do it:
// creating of HttpPost omitted
httpPost.addHeader("Accept", "application/json");
httpPost.addHeader("Content-Type"," text/plain; charset=UTF-8");
StringEntity entity = new StringEntity("PPP2R1A,CEP192,AKAP9,CENPJ,CEP290,DYNC1H1");
httpPost.setEntity(entity);
// execute post and get result etc.