Code example for Proxy

Methods: type

0
        ? httpEngine.connection.getRoute().getProxy()
        : client.getProxy();
    final int responseCode = getResponseCode();
    switch (responseCode) {
      case HTTP_PROXY_AUTH:
        if (selectedProxy.type() != Proxy.Type.HTTP) {
          throw new ProtocolException("Received HTTP_PROXY_AUTH (407) code while not using proxy");
        } 
        // fall-through 
      case HTTP_UNAUTHORIZED:
        boolean credentialsFound = HttpAuthenticator.processAuthHeader(client.getAuthenticator(),
            getResponseCode(), httpEngine.getResponseHeaders().getHeaders(), rawRequestHeaders,
            selectedProxy, url);
        return credentialsFound ? Retry.SAME_CONNECTION : Retry.NONE;
 
      case HTTP_MULT_CHOICE:
      case HTTP_MOVED_PERM:
      case HTTP_MOVED_TEMP:
      case HTTP_SEE_OTHER:
      case HTTP_TEMP_REDIRECT:
        if (!getInstanceFollowRedirects()) {