ruper2/src/test/core/org/krysalis/ruper2/misc HttpClientTest.java,NONE,1.1

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/test/core/org/krysalis/ruper2/misc
In directory sc8-pr-cvs1:/tmp/cvs-serv30481/src/test/core/org/krysalis/ruper2/misc

Added Files:
	HttpClientTest.java 
Log Message:
Avoid clash with existing Ruper...

--- NEW FILE: HttpClientTest.java ---
/*
 * Created on Sep 5, 2003
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package org.krysalis.ruper2.misc;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.HeadMethod;

/**
 * @author ajack
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class HttpClientTest {
	public static void main(String args[])throws Exception {
		System.setProperty(
			"org.apache.commons.logging.Log",
			"org.apache.commons.logging.impl.SimpleLog");
		System.setProperty(
			"org.apache.commons.logging.simplelog.showdatetime",
			"true");
		System.setProperty(
			"org.apache.commons.logging.simplelog.log.httpclient.wire",
			"debug");

		System.setProperty(
			"org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
			"debug");

		String url = "http://www.ibiblio.org/maven";

		HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
		HeadMethod head = new HeadMethod(url);
		client.executeMethod(head);
		
		GetMethod get = new GetMethod(url);

		client.executeMethod(get);
		get.getResponseBody();
		
		GetMethod get2 = new GetMethod(url);

		client.executeMethod(get);
		get2.getResponseBody();
		
		System.out.println("Done...");
	}
}




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.