Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
JHttpResponse com.griddynamics.jagger.invoker.v2.SpringBasedHttpClient.execute ( JHttpEndpoint  endpoint,
JHttpQuery  query 
)

Performs HTTP query to the endpoint.

Parameters
endpointJHttpEndpoint to which query must be performed
queryJHttpQuery to perform
Returns
JHttpResponse - the result of the query
See Also
JHttpResponse
JHttpEndpoint
JHttpQuery

Implements com.griddynamics.jagger.invoker.v2.JHttpClient.

Definition at line 121 of file SpringBasedHttpClient.java.

References com.griddynamics.jagger.invoker.v2.JHttpEndpoint.getURI().

Referenced by com.griddynamics.jagger.invoker.scenario.JHttpUserScenarioInvoker.invoke().

121  {
122  if (query == JHttpQuery.EMPTY_QUERY)
123  return execute(endpoint);
124 
125  URI endpointURI = endpoint.getURI(query.getPath(), query.getQueryParams());
126  RequestEntity requestEntity = mapToRequestEntity(query, endpointURI);
127  ResponseEntity responseEntity;
128  if (query.getResponseBodyType() != null) {
129  responseEntity = restTemplate.exchange(endpointURI, query.getMethod(), requestEntity, query.getResponseBodyType());
130  } else {
131  responseEntity = restTemplate.exchange(endpointURI, query.getMethod(), requestEntity, byte[].class);
132  }
133  return mapToJHttpResponse(responseEntity);
134  }

Here is the call graph for this function:

Here is the caller graph for this function: