调查Http通信的记录,本来在程序里输出了request的电文头部。
可是担心有什么遗漏,比如通信的默认设定什么的。
所以可以通过log来确认。
在程序里打上下面的一段就可以了,控制台里可以看到每次请求的详细记录。
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.header", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "debug");