crnk-project / crnk-framework

JSON API library for Java
Apache License 2.0
285 stars 153 forks source link

Not able to inject custom header in response #871

Open sans30 opened 1 year ago

sans30 commented 1 year ago

Hello,

I am using ResourceRepositoryBase class and i have an use case to inject custom header in response. I have tried to implement HttpRequestContextAware interface in my repository class and added below code snippet in findAll() method, but i am not seeing the custom header in response. I couldn't find clear documentation to achieve this functionality.

httpRequestContextProvider.getRequestContext().get response().setHeader("custom-header","custom-values");

Could you please suggest and share some sample..

Thanks in Advance!!