code: @SuppressWarnings("unchecked")
  	public <T> T call(String methodName, String restPath, Class<T> expectedResponse, Object payload,
  			Map<String, String> queryParams) {
  		WebTarget webTarget = createWebTarget(restPath, queryParams);
  		Response result = webTarget.request().headers(headers).accept(mediaType.getMediaType()).method(
  				methodName.toString(),
  				Entity.entity(payload, mediaType.getMediaType()),
  				Response.class);
  
  		if (expectedResponse.getName().equals(Response.class.getName())) {
  			return (T) result;
  		}
  		
  		if (result != null && isStatusCodeOK(result, restPath)) {
  			return (T) result.readEntity(expectedResponse);
  		}
  
  		throw new WebApplicationException("Unhandled response", result);
  	}
docs: Gets the.
  
  @param <T>
  the generic type
  @param methodName
  the method name
  @param restPath
  the rest path
  @param expectedResponse
  the clazz
  @param payload
  the payload
  @param queryParams
  the query params
  @return the t