}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public List<R> query(Q query, WebContext context) {
RequestSpec requestSpec = callSpec.getRequestSpec();
HeaderMap.Builder requestHeadersBuilder = new HeaderMap.Builder(requestSpec.getHeadersSpec());
if (context != null) {
context.populate(requestHeadersBuilder);
}
RequestBody requestBody = new RequestBody.Builder(requestSpec.getBodySpec())
.build();
UrlParams urlParams = new UrlParams.Builder(requestSpec.getUrlParamsSpec(), query).build();
WebServiceRequest request = new WebServiceRequest(
HttpMethod.GET, requestHeadersBuilder.build(), urlParams, requestBody, inlined);
WebServiceResponse response = stub.getResponse(callSpec, request, gson);
ResponseBody body = response.getBody();
// Using a local variable for listBody otherwise Maven freaks out while compiling