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

Add JSONIFY_MIMETYPE configuration variable #1728

Merged
merged 1 commit into from Apr 8, 2016

Conversation

@sloria
Copy link
Contributor

@sloria sloria commented Feb 16, 2016

It is often useful to be able to return a vendor media type for JSON responses. For example, JSON API requires that all responses have the Content-Type: applications/vnd.api+json header.

@@ -1029,6 +1029,18 @@ def test_jsonify_prettyprint():
assert rv.data == pretty_response


def test_jsonify_mimetype():
app = flask.Flask(__name__)
app.config.update({"JSONIFY_MIMETYPE": 'application/vnd.api+json'})

This comment has been minimized.

Loading

This comment has been minimized.

Loading

@sloria sloria force-pushed the jsonify-mimetype branch from 6afffdb to a3c574f Feb 18, 2016
@jeffwidman
Copy link
Member

@jeffwidman jeffwidman commented Apr 8, 2016

LGTM

Loading

@untitaker
Copy link
Member

@untitaker untitaker commented Apr 8, 2016

LGTM, but the changelog entry is now for the wrong version.

Loading

Allow jsonify responses' mimetype to be configured
@sloria sloria force-pushed the jsonify-mimetype branch from a3c574f to 2cfaf04 Apr 8, 2016
@sloria
Copy link
Contributor Author

@sloria sloria commented Apr 8, 2016

OK, I've rebased with the latest master and put the changelog entry in the 1.0 section.

Loading

@davidism davidism merged commit 2bf477c into pallets:master Apr 8, 2016
1 check passed
Loading
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants