-
-
Notifications
You must be signed in to change notification settings - Fork 88
non json response #321
Comments
That's probably a good idea. I'll try to put a PR together, but would love to review one instead if you have the time 😅 |
@alexlafroscia sorry, not at the moment. Had been trying to avoid putting more jquery into projects anyways, so probably I'll go with plain xhrs in the end. But didn't even had the time to check that so far. |
Totally with you, that's a good idea. |
I wish it were that simple. If you want to do things like show progress to your users, fetch related stuff is out 😞 And I noticed that if you want to do things like that with jquery you find yourself digging around in plain xhr stuff again. So, when I can find the time I want to promisify xhr2 and see how that ends up. |
Ahh, yeah. That makes sense. It's a shame that |
@st-h Thank you for this. It saved me forking the repo 👍 |
Is there a nice way to handle non json responses, like binary data or an empty response body?
As for binary data, tampering with the underlying xhr works, but hasn't been quite easy to figure out as one first needs to be aware of if it is an issue with the addon itself or a jquery configuration/issue.
Might save people some work by mentioning in the docs, if there isn't an easier way. However, it might be nice to just try to parse json if the content type actually indicates a json response.
The text was updated successfully, but these errors were encountered: