docs: @SuppressWarnings("unchecked")
      private HttpRequest createHttpRequest(SwaggerMethodParser methodParser, Object[] args) throws IOException {
          UrlBuilder urlBuilder;
  
          // Sometimes people pass in a full URL for the value of their PathParam annotated argument.
          // This definitely happens in paging scenarios. In that case, just use the full URL and
          // ignore the Host annotation.
          final String path = methodParser.path(args);
          final UrlBuilder pathUrlBuilder = UrlBuilder.parse(path);
          if (pathUrlBuilder.scheme() != null) {
              urlBuilder = pathUrlBuilder;
          } else {
              urlBuilder = new UrlBuilder();
  
              // We add path to the UrlBuilder first because this is what is
              // provided to the HTTP Method annotation. Any path substitutions
              // from other substitution annotations will overwrite this.
              urlBuilder.withPath(path);
  
              final String scheme = methodParser.scheme(args);
              urlBuilder.withScheme(scheme);
  
              final String host = methodParser.host(args);
              urlBuilder.withHost(host);
          }
  
          for (final EncodedParameter queryParameter : methodParser.encodedQueryParameters(args)) {
              urlBuilder.setQueryParameter(queryParameter.name(), queryParameter.encodedValue());
          }
  
          final URL url = urlBuilder.toURL();
          final HttpRequest request = configRequest(new HttpRequest(methodParser.httpMethod(), url), methodParser, args);
  
          // Headers from Swagger method arguments always take precedence over inferred headers from body types
          for (final HttpHeader header : methodParser.headers(args)) {
              request.withHeader(header.name(), header.value());
          }
  
          return request;
      }