Skip to content

Null value in jQuery.get doesn't allow use of dataType #4989

Closed
@jcubic

Description

@jcubic

Description

According to jQuery.get documentation you can use null as success function to be able to use dataType. But it seems that it's not working. The only way to get text from JSON response is to use $.noop. So this need to be fixed or documentation needs to be updated.

I use jQuery 3.6.0.

Link to test case

await $.get("https://httpbin.org/json", null, "text")
await $.get("https://httpbin.org/json", $.noop, "text")

https://jsbin.com/safuliduje/edit?html,css,js,output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions