Skip to content

Make contentType also an option to set #223

@geeForceOne

Description

@geeForceOne

I'm working with a legacy Software and I can only make the serviceUrl work if I can set the contentType of $.ajax to "application/json; charset=utf-8". Would be nice if this could also be passed as an option in a future release. Many thanks.

            that.currentRequest = $.ajax({
                url: serviceUrl,
                data: params,
                type: options.type,
             contentType: opitons.contentType, 
                dataType: options.dataType
            }).done(function (data) {
                var result;
                that.currentRequest = null;
                result = options.transformResult(data);
                that.processResponse(result, q, cacheKey);
                options.onSearchComplete.call(that.element, q, result.suggestions);
            }).fail(function (jqXHR, textStatus, errorThrown) {
                options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);
            });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions