Kong/kong-python-pdk

Lua Error: Not able to find pdk method

abhisheksharma2805 opened this issue · 3 comments

I was trying to run the py-hello plugin in the examples. Getting the following error when I try to request the service endpoint /my-app

[info] 24#0: *17 [python:30] INFO - [21:54:21] instance #0 of py-hello started, context: ngx.timer
[error] 24#0: *869 [kong] mp_rpc.lua:119 [py-hello] could not find pdk method: kong.kong.request.get_header, client: 172.20.0.1, server: kong, request: "GET /my-app/ HTTP/1.1", host: "localhost:8000"

Hi @abhisheksharma2805, you should use kong.request.get_header instead of kong.kong.request.get_header.

Yes this works. Thanks @fffonion
Example plugins should be updated

The example is actually correct 😄 I think you made some change to it in #12 which I pointed out was not correct.
BTW the issue in #12 has been resolved, you should be able to use the latest PDK with the example unmodified
without issue now.

Closing this now and feel free to create new if you encounter it again.