-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
JSON request/response mixin #1984
Conversation
d175d49
to
136a833
Compare
# been encoded correctly as well. | ||
charset = self.mimetype_params.get('charset') | ||
try: | ||
data = self._get_data_for_json(cache) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Any progress on this ? Could you rebase ? I've been looking for better JSON support (a-la python-requests) and there's already several bug reports and PR in flask and werkzeug about this. This looks like a popular demand :) |
This change would make a big difference to us. Sorry to see that it is nearly two years old, can I do something to help? |
This request merged would be a huge relief for me and my team also. @mitsuhiko, @untitaker, how can we make this happen? |
+1 for this feature. Any way to help this get in? |
needs a rebase! |
Maybe it would be better to use Requests as the test client :) |
The :meth:`get_json` method should be used instead. | ||
""" | ||
from warnings import warn | ||
warn(DeprecationWarning( |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
closing, old pr, requests is actually a better idea for the client (though i'm sure that's not an obvious choice) |
That is only your opinion at the moment, and the Flask docs don't show how to
use it as one. Before we settle on this we should make clear how to actually
use it in tests.
Right now you have to spin up a dev server for this.
…On Thu, May 25, 2017 at 03:07:25PM -0700, Kenneth Reitz wrote:
Closed #1984.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1984 (comment)
|
i definitely don't think requests should go in, i'm mostly joking about that :) |
may have been premature to close this — i reviewed every line of code, and it seemed solid until i got to the deprecation of |
I'm not sure either what to think of that.
We can have (parts of) requests as test client and it would probably be an UX
improvement, but right now I consider the overhead of its entire HTTP stack to
be too much.
…On Thu, May 25, 2017 at 03:15:35PM -0700, Kenneth Reitz wrote:
may have been premature to close this — i reviewed every line of code, and it seemed solid until i got to the deprecation of `.json`. then, I saw that there may be some issues with werkzeug and saw the merge conflicts so decided to close.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1984 (comment)
|
Well, you'd write a connection adapter that would skip it speaking HTTP and have it talk WSGI instead. Should be <30LOC. It's alright though, people are used to having unique test clients, and people are def used to the one built in here. |
Continued in #2358. |
Continuing #1416
All inline discussions have been resolved.