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); } }
void setHeader(final ClientRequestConfigurer clientRequestConfigurer, final X t) { clientRequestConfigurer.header(getName(), parser.asString(t)); }