/** * @param config the global config * @param request the request * @return the proxy server to be used for this request (can be null) */ public static ProxyServer getProxyServer(AsyncHttpClientConfig config, Request request) { ProxyServer proxyServer = request.getProxyServer(); if (proxyServer == null) { ProxyServerSelector selector = config.getProxyServerSelector(); if (selector != null) { proxyServer = selector.select(request.getUri()); } } return proxyServer != null && !proxyServer.isIgnoredForHost(request.getUri().getHost()) ? proxyServer : null; }
this.proxyServer = prototype.getProxyServer(); this.realm = prototype.getRealm(); this.file = prototype.getFile();
.setLocalAddress(request.getLocalAddress()) .setNameResolver(request.getNameResolver()) .setProxyServer(request.getProxyServer()) .setRealm(request.getRealm()) .setRequestTimeout(request.getRequestTimeout());
/** * @param config the global config * @param request the request * @return the proxy server to be used for this request (can be null) */ public static ProxyServer getProxyServer(AsyncHttpClientConfig config, Request request) { ProxyServer proxyServer = request.getProxyServer(); if (proxyServer == null) { ProxyServerSelector selector = config.getProxyServerSelector(); if (selector != null) { proxyServer = selector.select(request.getUri()); } } return ProxyUtils.avoidProxy(proxyServer, request) ? null : proxyServer; }
public RequestImpl(Request prototype) { if (prototype != null) { this.method = prototype.getMethod(); this.uri = prototype.getUri(); this.address = prototype.getInetAddress(); this.localAddress = prototype.getLocalAddress(); this.headers = new FluentCaseInsensitiveStringsMap(prototype.getHeaders()); this.cookies = new ArrayList<>(prototype.getCookies()); this.byteData = prototype.getByteData(); this.compositeByteData = prototype.getCompositeByteData(); this.stringData = prototype.getStringData(); this.byteBufferData = prototype.getByteBufferData(); this.streamData = prototype.getStreamData(); this.bodyGenerator = prototype.getBodyGenerator(); this.formParams = prototype.getFormParams() == null ? null : new ArrayList<>(prototype.getFormParams()); this.parts = prototype.getParts() == null ? null : new ArrayList<>(prototype.getParts()); this.virtualHost = prototype.getVirtualHost(); this.length = prototype.getContentLength(); this.proxyServer = prototype.getProxyServer(); this.realm = prototype.getRealm(); this.file = prototype.getFile(); this.followRedirect = prototype.getFollowRedirect(); this.requestTimeout = prototype.getRequestTimeout(); this.rangeOffset = prototype.getRangeOffset(); this.charset = prototype.getBodyCharset(); this.connectionPoolPartitioning = prototype.getConnectionPoolPartitioning(); this.nameResolver = prototype.getNameResolver(); } }
.setProxyServer(request.getProxyServer())//
.setProxyServer(request.getProxyServer())//
.setProxyServer(request.getProxyServer())//
.setProxyServer(request.getProxyServer())//