RestRequestSpec requestSpec = callSpec.getRequestSpec();
HeaderMap.Builder requestHeadersBuilder = new HeaderMap.Builder(requestSpec.getHeadersSpec());
if (context != null) {
context.populate(requestHeadersBuilder);
}
HeaderMap requestHeaders = requestHeadersBuilder.build();
UrlParamsSpec urlParamsSpec = callSpec.getRequestSpec().getUrlParamsSpec();
UrlParams urlParams = new UrlParams.Builder(urlParamsSpec).build();
RestRequestBase<I, R> request = new RestRequestBase<I, R>(
HttpMethod.POST, requestHeaders, urlParams, resource.getId(), resource, resourceType, inlined);
RestResponseBase<I, R> response = stub.getResponse(callSpec, request, gson);