Created
November 30, 2011 21:44
-
-
Save LeifWarner/1411062 to your computer and use it in GitHub Desktop.
Logging http requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the block passed to Curl::Easy: | |
e.g. {|curl| | |
curl.verbose = true | |
} | |
Logs headers only, not body. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.System | |
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog") | |
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "DEBUG") | |
Logs full requests/responses. | |
Other options available at: | |
http://hc.apache.org/httpcomponents-client-ga/logging.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment