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

handler return automatically sets content-type #48

Closed
The-EDev opened this issue Nov 9, 2020 · 1 comment · Fixed by #212
Closed

handler return automatically sets content-type #48

The-EDev opened this issue Nov 9, 2020 · 1 comment · Fixed by #212
Labels
feature Code based project improvement good first issue an issue suitable to start contributing to the project

Comments

@The-EDev
Copy link
Member

The-EDev commented Nov 9, 2020

discussion in ipkn#250

Currently Crow only supports this with its own JSON data type, no xml, no anything.

one potential solution would be to create a response constructor argument that specifies the content type (as opposed to just headers), this can be done by using an extention (e.g. xml) and then using mime_types.h to get the proper content-type header.

@The-EDev The-EDev added the feature Code based project improvement label Nov 9, 2020
@The-EDev
Copy link
Member Author

The-EDev commented Dec 1, 2020

The solution here is to add a response constructors that allow either a string containing headers or a ci_map, and a constructor with a string for Content-Type.

@The-EDev The-EDev self-assigned this Dec 6, 2020
@The-EDev The-EDev added the good first issue an issue suitable to start contributing to the project label Jul 23, 2021
@The-EDev The-EDev removed their assignment Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Code based project improvement good first issue an issue suitable to start contributing to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant