@PK You can use any (Log Analytics or Application Insights) to capture the request and response body.
Sharing previous discussion on stackoverflow what to choose.
For the configuration you can refer to this.
Under the Diagnostic Logs setting --> Azure Monitor/Application Insights you need to enable the Additional settings and specify the payload as per your requirement. For testing I am logging everything and specify the max payload (8192). Make sure to change the payload value from 0 else the log will not be collected.
Once I have updated the setting you can see the logs are getting captured correctly.
Feel free to get back to me if you need any assistance.