Esempio n. 1
0
  public RestfulResponse<JsonRepresentation> execute() {
    try {
      if (!args.isEmpty()) {
        clientRequestConfigurer.configureArgs(args);
      }
      final Response response = clientRequestConfigurer.getClientRequest().execute();

      // this is a bit hacky
      @SuppressWarnings("unchecked")
      final BaseClientResponse<String> restEasyResponse = (BaseClientResponse<String>) response;
      restEasyResponse.setReturnType(String.class);

      return RestfulResponse.ofT(response);
    } catch (final Exception ex) {
      throw new RuntimeException(ex);
    }
  }