Help for this page

Select Code to Download


  1. or download this
    my $ua = LWP::UserAgent->new;
    
    ...
    
    # Authenticate against the proxy - hardcoded
    $req->proxy_authorization_basic("domain/user", "password");
    
  2. or download this
    URL url = new URL("target");
    String authString = "domain/user:password";      
    String auth = "Basic " + new sun.misc.BASE64Encoder().encode(authStrin
    +g.getBytes());
    URLConnection conn = url.openConnection();
                conn.setRequestProperty("Proxy-Authorization", auth);