Returning response header #338
Unanswered
timpamungkas
asked this question in
Q&A
Replies: 2 comments
-
I also need to know this to handle Authentication cookies. Can someone help us out? |
Beta Was this translation helpful? Give feedback.
0 replies
-
It's not super convenient, but it's possible: DgsWebMvcRequestData webMvcRequestData = (DgsWebMvcRequestData)DgsContext.getRequestData(env);
WebRequest webRequest = webMvcRequestData.getWebRequest();
((ServletWebRequest) webRequest).getResponse().addHeader("myheader", "hello"); Note that this relies on the underlying Servlet API. If you're using WebFlux you'll need to use its API instead, which you would also get from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
DGS can receive request header, but can I send custom response headers to graphql client?
Beta Was this translation helpful? Give feedback.
All reactions