You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I need to serve different responses depending on the Accept-Language header sent by the client. How would I do this?
I know the header is available as variable #{HEADER_ACCEPT_LANGUAGE} but how do I rout to different json based on that? Can I use variables in the config.json? I'm assuming it needs to be defined somewhere in the config.json, but where exactly and how?
The text was updated successfully, but these errors were encountered:
Totally different responses are not possible. But you can return the header variable. There is a way to do what you might want to do with languages (or at least I am guessing what you might want to do). You can set variables in config.json like "name_de". Then in the response you return #{name_#{HEADER_ACCEPT_LANGUAGE}}.
Hi, I need to serve different responses depending on the Accept-Language header sent by the client. How would I do this?
I know the header is available as variable #{HEADER_ACCEPT_LANGUAGE} but how do I rout to different json based on that? Can I use variables in the config.json? I'm assuming it needs to be defined somewhere in the config.json, but where exactly and how?
The text was updated successfully, but these errors were encountered: