use of io.servicecomb.transport.rest.client.http.VertxHttpMethod in project java-chassis by ServiceComb.
the class RestTransportClient method send.
public void send(Invocation invocation, AsyncResponse asyncResp) throws Exception {
HttpClientWithContext httpClientWithContext = clientMgr.findThreadBindClientPool();
OperationMeta operationMeta = invocation.getOperationMeta();
RestOperationMeta swaggerRestOperation = operationMeta.getExtData(RestConst.SWAGGER_REST_OPERATION);
String method = swaggerRestOperation.getHttpMethod();
try {
VertxHttpMethod httpMethod = HttpMethodFactory.findHttpMethodInstance(method);
httpMethod.doMethod(httpClientWithContext, invocation, asyncResp);
} catch (Exception e) {
asyncResp.fail(invocation.getInvocationType(), e);
LOGGER.error("vertx rest transport send error.", e);
}
}
Aggregations