public static HttpProcessorBuilder customClient(final String agentInfo) { return HttpProcessorBuilder.create() .addAll( new H2RequestContent(), new H2RequestTargetHost(), new H2RequestConnControl(), new RequestUserAgent(!TextUtils.isBlank(agentInfo) ? agentInfo : VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", HttpProcessors.class)), new RequestExpectContinue()); }
MinimalHttpClient(final HttpClientConnectionManager connManager) { super(); this.connManager = Args.notNull(connManager, "HTTP connection manager"); this.reuseStrategy = DefaultConnectionReuseStrategy.INSTANCE; this.schemePortResolver = DefaultSchemePortResolver.INSTANCE; this.requestExecutor = new HttpRequestExecutor(this.reuseStrategy); this.httpProcessor = new DefaultHttpProcessor( new RequestContent(), new RequestTargetHost(), new RequestClientConnControl(), new RequestUserAgent(VersionInfo.getSoftwareInfo( "Apache-HttpClient", "org.apache.hc.client5", getClass()))); }
private static HttpProcessor createMinimalProtocolProcessor() { return new DefaultHttpProcessor( new H2RequestContent(), new H2RequestTargetHost(), new H2RequestConnControl(), new RequestUserAgent(VersionInfo.getSoftwareInfo( "Apache-HttpAsyncClient", "org.apache.hc.client5", HttpAsyncClients.class))); }
public static HttpProcessorBuilder customServer(final String serverInfo) { return HttpProcessorBuilder.create() .addAll( new ResponseDate(), new ResponseServer(!TextUtils.isBlank(serverInfo) ? serverInfo : VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", Http2Processors.class)), new H2ResponseContent(), new H2ResponseConnControl()) .addAll( new H2RequestValidateHost()); }
/** * Creates {@link HttpProcessorBuilder} initialized with default protocol interceptors * for client side HTTP/1.1 processing. * * @param agentInfo the agent info text or {@code null} for default. * @return the processor builder. */ public static HttpProcessorBuilder customClient(final String agentInfo) { return HttpProcessorBuilder.create() .addAll( new RequestContent(), new RequestTargetHost(), new RequestConnControl(), new RequestUserAgent(!TextUtils.isBlank(agentInfo) ? agentInfo : VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", HttpProcessors.class)), new RequestExpectContinue()); }
/** * Creates {@link HttpProcessorBuilder} initialized with default protocol interceptors * for client side HTTP/1.1 processing. * * @param agentInfo the agent info text or {@code null} for default. * @return the processor builder. */ public static HttpProcessorBuilder customClient(final String agentInfo) { return HttpProcessorBuilder.create() .addAll( new RequestContent(), new RequestTargetHost(), new RequestConnControl(), new RequestUserAgent(!TextUtils.isBlank(agentInfo) ? agentInfo : VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", HttpProcessors.class)), new RequestExpectContinue()); }
/** * Creates {@link HttpProcessorBuilder} initialized with default protocol interceptors * for server side HTTP/1.1 processing. * * @param serverInfo the server info text or {@code null} for default. * @return the processor builder. */ public static HttpProcessorBuilder customServer(final String serverInfo) { return HttpProcessorBuilder.create() .addAll( new ResponseDate(), new ResponseServer(!TextUtils.isBlank(serverInfo) ? serverInfo : VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", HttpProcessors.class)), new ResponseContent(), new ResponseConnControl()) .addAll( new RequestValidateHost()); }
/** * Creates {@link HttpProcessorBuilder} initialized with default protocol interceptors * for server side HTTP/1.1 processing. * * @param serverInfo the server info text or {@code null} for default. * @return the processor builder. */ public static HttpProcessorBuilder customServer(final String serverInfo) { return HttpProcessorBuilder.create() .addAll( new ResponseDate(), new ResponseServer(!TextUtils.isBlank(serverInfo) ? serverInfo : VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", HttpProcessors.class)), new ResponseContent(), new ResponseConnControl()) .addAll( new RequestValidateHost()); }
userAgentCopy = VersionInfo.getSoftwareInfo("Apache-HttpClient", "org.apache.hc.client5", getClass());
userAgentCopy = VersionInfo.getSoftwareInfo("Apache-HttpAsyncClient", "org.apache.hc.client5", getClass());
userAgentCopy = VersionInfo.getSoftwareInfo("Apache-HttpAsyncClient", "org.apache.hc.client5", getClass());