generateRequestBuilder();
generateHeaders();
ContextualStatementBuilder sendRequest = Stmt.loadVariable("requestBuilder");
if (resourceMethod.getParameters().getEntityParameter() == null) {
sendRequest = sendRequest.invoke("sendRequest", null, createRequestCallback());
}
else {
Statement body = marshal(resourceMethod.getParameters().getEntityParameter(),
resourceMethod.getContentTypeHeader());
sendRequest = sendRequest.invoke("sendRequest", body, createRequestCallback());