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 handler for Http Response code - 204 No Content #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hnhegde
Copy link

@hnhegde hnhegde commented Jul 19, 2019

Hello,
This PR is w.r.t. DataTables forum discussion on handling HTTP 204 - No Content responses.
Full discussion is here.
Issue: With ajax sourced data, when response received is 204, then dataTables throws following error:

at Object.success (jquery.dataTables.js:3888) 
at fire (jquery.js:3291) 
at Object.fireWith [as resolveWith] (jquery.js:3421) 
at done (jquery.js:9533) 
at XMLHttpRequest.<anonymous> (jquery.js:9785)```

Proposed solution: If response returned is a null object and http status is 204, then intercept the null object and return a blank json dict object instead. 

@DataTables
Copy link
Collaborator

Thanks for this! I've actually got this in the 2 branch already.

@hnhegde
Copy link
Author

hnhegde commented Sep 6, 2019

Thanks for this! I've actually got this in the 2 branch already.

Hi @DataTables, any idea when 2.0 will be out? I am now managing this fix manually in 1.10.
Regards,
Harsha

@DataTables
Copy link
Collaborator

Probably sometime in 2020, but no firm date yet while we are working on other aspects of the software I'm afraid.

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

Successfully merging this pull request may close these issues.

2 participants