commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsde...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/examples TrivialApp.java
Date Mon, 05 May 2003 16:36:21 GMT
jsdever     2003/05/05 09:36:21

  Modified:    httpclient/src/examples TrivialApp.java
  Log:
  Minor fixes to the example.
  
  Revision  Changes    Path
  1.12      +7 -6      jakarta-commons/httpclient/src/examples/TrivialApp.java
  
  Index: TrivialApp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/examples/TrivialApp.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TrivialApp.java	7 Apr 2003 19:23:36 -0000	1.11
  +++ TrivialApp.java	5 May 2003 16:36:20 -0000	1.12
  @@ -84,6 +84,7 @@
   
       private static final void printUsage()
       {
  +        System.out.println();
           System.out.println("Usage: java -classpath <classpath> [-Dorg.apache.commons.logging.simplelog.defaultlog=<loglevel>]
TrivialApp <url> [<username> <password>]");
           System.out.println("<classpath> - must contain the commons-httpclient.jar
and commons-logging.jar");
           System.out.println("<loglevel> - one of error, warn, info, debug, trace");
  @@ -111,9 +112,9 @@
           //establish a connection within 5 seconds
           client.setConnectionTimeout(5000);
   
  -        //set username / password
  +        //set the default credentials
           if (creds != null) {
  -            client.getState().setCredentials(null, null, creds);
  +            client.getState().setCredentials(null, creds);
           }
   
           String url = args[0];
  @@ -147,7 +148,7 @@
           //write out the request headers
           System.out.println("*** Request ***");
           System.out.println("Request Path: " + method.getPath());
  -        System.out.println("Request Path: " + method.getQueryString());
  +        System.out.println("Request Query: " + method.getQueryString());
           Header[] requestHeaders = method.getRequestHeaders();
           for (int i=0; i<requestHeaders.length; i++){
               System.out.print(requestHeaders[i]);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message