Skip to content

Should accepts be set using $.ajaxSetup()? #378

Closed
@Peeja

Description

@Peeja

The documentation seems conflicted. $.ajax() says:

If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.

while $.ajaxSetup() says:

Note: The settings specified here will affect all calls to $.ajax or AJAX-based derivatives such as $.get(). This can cause undesirable behavior since other callers (for example, plugins) may be expecting the normal default settings. For that reason we strongly recommend against using this API. Instead, set the options explicitly in the call or define a simple plugin to do so.

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