Closed danesavot closed 1 week ago
You can't buffer a body on an Endpoint
filter. What are you trying to do on that endpoint?
I'm having the exact same problem.
I needed an Async endpoint, which I think Zuul2 doesn't provide, and it needs to read the body of the request.
I also tried copying the workflow from Zuul's HttpSyncEndpoint, but they still cause the body to be unavailable to my endpoint.
@danesavot do you have any workaround that you implemented? As this issue is almost 2 years old, now.
Yeah, i think I have. You need to create an InBoundFilter and override needsBodyBuffered() there so that Zull will buffer the body for the Endpoint and avoid above NPE. Let me know if you need further clarification :)
Thank you @danesavot, it works like a charm.
Just to provide more context to Zuul's team of why this is needed: I have a framework that I made it use Observable to be able to use it in the filters. But some of the Proxy operations require the Proxy itself to access and persist the information, and I'd love to see it using the same framework.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
I've got NulPointerException thrown when enabling needsBodyBufferred() with the following stack trace:
Ex: