public RestfulRequest createRequest(final RestfulHttpMethod httpMethod, final String uriTemplate) { final boolean includesScheme = uriTemplate.startsWith("http:") || uriTemplate.startsWith("https:"); final String base = clientRequestFactory.getBase().toString(); final String uri = (includesScheme ? "" : base) + uriTemplate; final ClientRequestConfigurer clientRequestConfigurer = ClientRequestConfigurer.create(executor, uri); clientRequestConfigurer.accept(MediaType.APPLICATION_JSON_TYPE); clientRequestConfigurer.setHttpMethod(httpMethod); return new RestfulRequest(clientRequestConfigurer); }
public RestfulRequest createRequest(final HttpMethod httpMethod, final String uriTemplate) { final boolean includesScheme = uriTemplate.startsWith("http:") || uriTemplate.startsWith("https:"); final String base = clientRequestFactory.getBase().toString(); final String uri = (includesScheme ? "" : base) + uriTemplate; final ClientRequestConfigurer clientRequestConfigurer = ClientRequestConfigurer.create(executor, uri); clientRequestConfigurer.accept(MediaType.APPLICATION_JSON_TYPE); clientRequestConfigurer.setHttpMethod(httpMethod); return new RestfulRequest(clientRequestConfigurer); }
public ClientRequestFactory(ClientRequestFactory other) { this.providerFactory = other.providerFactory; this.executor = other.executor; this.setBase(other.getBase()); this.applyDefaultInterceptors = other.applyDefaultInterceptors; this.followRedirects = other.followRedirects; other.prefixInterceptors .copyClientInterceptorsTo(this.prefixInterceptors); other.suffixInterceptors .copyClientInterceptorsTo(this.suffixInterceptors); }
public ClientRequestFactory(ClientRequestFactory other) { this.providerFactory = other.providerFactory; this.executor = other.executor; this.setBase(other.getBase()); this.applyDefaultInterceptors = other.applyDefaultInterceptors; this.followRedirects = other.followRedirects; other.prefixInterceptors .copyClientInterceptorsTo(this.prefixInterceptors); other.suffixInterceptors .copyClientInterceptorsTo(this.suffixInterceptors); }