manual merge of #125

This commit is contained in:
Tony Tam 2014-01-16 20:34:26 -08:00
parent 32d792de01
commit 5892fdb2bb

View File

@ -156,8 +156,11 @@ public class ApiInvoker {
}
else if ("POST".equals(method)) {
HttpPost post = new HttpPost(url);
if (body != null) {
post.setHeader("Content-Type", contentType);
post.setEntity(new StringEntity(serialize(body), "UTF-8"));
}
for(String key : headers.keySet()) {
post.setHeader(key, headers.get(key));
}