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

Custom content-type converters in .ajaxSetup() also needs a "contents" map entry #100

Open
mikesherov opened this issue Oct 15, 2012 · 0 comments

Comments

@mikesherov
Copy link
Member

$.ajaxSetup({
    converters: {
        "mycustomtype json": function (result) {
            //do stuff
            return newresult;
        }
    }
});

was not working. The solution needed was:

$.ajaxSetup({
    contents: {
        mycustomtype: /mycustomtype/
    },
    converters: {
        "mycustomtype json": function (result) {
            //do stuff
            return newresult;
        }
    }
});

which simply included a contents regex map. Please see http://bugs.jquery.com/ticket/11376 for more information, and ping @addyosmani to see if he's attempted documenting this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants