Request request = newRequest();
// generate request headers
request.headers = Maps.newHashMap();
for (HeaderWrapper wrapper : wrappers) {
Header header = new Header();
header.values = Arrays.asList(wrapper.getValue());
request.headers.put(wrapper.getKey(), header);
}
String queuedTask = taskInfo.getBody();
return POST(request, "/tasks", APPLICATION_X_WWW_FORM_URLENCODED, queuedTask);