Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two different headers for the same route #2365

Open
pcmanprogrammeur opened this issue Apr 13, 2022 · 0 comments
Open

Two different headers for the same route #2365

pcmanprogrammeur opened this issue Apr 13, 2022 · 0 comments

Comments

@pcmanprogrammeur
Copy link

Hi,
I would like to create a route to generate a csv but if there is an exception to generate a json response.
Is it possible to return two different headers please ?
I tried this without success

    format_listener:
        rules:
            - { path: .*/my_route/.*, prefer_extension: true, fallback_format: ~, priorities: [ json, csv ] }

Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant