POST values should be encoded in the request data string, not the headers. Not sure why there isn't an addPostValue method too. Here's some code I used recently:
class CustomPOSTBuilder extends RequestBuilder {
private String request = "";
public CustomPOSTBuilder(String url, RequestCallback callback) {
super(RequestBuilder.POST, url);
this.setHeader("Content-Type", "application/x-www-form-urlencoded");
this.setCallback(callback);
}
public void addPost(String key, String value) {
request += key + "=" + value + "&";
}
public void go() {
this.setRequestData(request);
try {
this.send();
}
catch (RequestException r){
System.out.print(r.getMessage());
}
}
}
then send a request by:
CustomPOSTBuilder builder...
builder.addPost("key1", "value1");
builder.addPost("key2", "value2");
builder.send();