For debugging purposes , I need to retrieve the raw POST request of an
restTemplate.postForObject
method , is there any way to obtain it before it get send?
For debugging purposes , I need to retrieve the raw POST request of an
restTemplate.postForObject
method , is there any way to obtain it before it get send?
If you are using Apache HttpComponents as the underlying HTTP client library for RestTemplate
, you could simply add the following to your application.properties
file and you are good to go:
logging.level.org.apache.http=DEBUG