Using Apache HTTPClient - how can one see the raw request string before it's being sent?

前端 未结 4 1488
庸人自扰
庸人自扰 2020-12-15 05:29

For debugging purposes, I\'d like to see the raw request that is going to be sent. Is there a way to get this without a HTTP monitor directly from the API of HttpPost or Htt

4条回答
  •  盖世英雄少女心
    2020-12-15 05:59

    Try enabling DEBUG mode in your logging configurations, if you're using log4j you can add this to the log4j.xml file of your project

    
        
        
    
    

    You will have the full request headers, params, body, etc, logged in your logs files.

提交回复
热议问题