0

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?

Nexussim Lements
  • 535
  • 1
  • 15
  • 47

1 Answers1

0

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
cassiomolin
  • 124,154
  • 35
  • 280
  • 359