When using the DefaultHttpClient() from the Apache Commons HTTP Client, is it possible to show the full request in the console output for debugging purposes?
DefaultHttpClient()
You can get all headers like this:
Enumeration headerNames = request.getHeaderNames(); while(headerNames.hasMoreElements()) { String headerName = (String)headerNames.nextElement(); out.println("" + headerName); out.println("" + request.getHeader(headerName)); }
See this tutorial for more info.