How to read POST data in jenkinsfile

Thanks for the response. I have a case where a pipeline must be triggered by bitbucket webhook. Bitbucket webhook sends event data in a JSON payload. I tried using their URL variables but have not figured out how to use them, plus they are limited. JSON data is more detailed, and getting that data in jenkinsfile would be more useful