Custom Python Plugin Pre Hook Programming


  I had successfully enable a pre hook. In the pre hook would like to access 2 things.

1. The parameters in the URL
2. The payload for he request.

How do I do it? The request object does not seems to provide that.

Thank you,


  1. The parameters in the URL

Can you please describe how you have tried to access the URL parameters? As the Python bindings should be providing a request object that contains a Param map of the key/value pairs from the query string of the request.

  1. The payload for he request.

This should also be available on the request object as a string called “Body”.

If possible could you share your Python code and which version Python you are using? Could you also include the section of your API Definition that configures the middleware to run as a pre hook.


Hi @chris.f
Thanks for your reply. I managed to figure it out.

 I was not able to locate the information I needed from the "request" object but rather I need to go one level deeper specifically it is located in request.object.params and request.object.body.