Skip to content

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

Open
@mikesherov

Description

@mikesherov
$.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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions