krakend / krakend-ce

KrakenD Community Edition: High-performance, stateless, declarative, API Gateway written in Go.
https://www.krakend.io
Apache License 2.0
1.92k stars 452 forks source link

Unable to get headers and statuscode using the examples #837

Open Zeychiel opened 8 months ago

Zeychiel commented 8 months ago

Environment info:

Describe what are you trying to do: I try to catch 201 responses from the backend to add a dedicated header ; using a response modifier but .Headers() and .StatusCode() oninput.(ResponseWrapper) are nil ; .Data() on the other hand does as expected

This issue: https://github.com/krakend/krakend-ce/issues/488#issuecomment-1157921730 says that this is by design ; but this example from the documentation: https://www.krakend.io/docs/extending/plugin-modifiers/#building-the-plugin image says otherwise.

Is the documentation outdated and it is by design that the values are empty when NOT using no-op ?

Thanks,

nsitbon commented 5 months ago

Hi @Zeychiel you're right that's by design and yes the documentation is wrong. Best regards.