8000 dataType doesnt work? · Issue #699 · madrobby/zepto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
dataType doesnt work? #699
@max-degterev

Description

@max-degterev

Hi! Having a bit of a problem here

@_req = $.ajax(
  url: app.api('suggest', place)
  dataType: 'json'
  success: _.bind(@renderSuggest, @)
  error: _.bind(@clearSuggest, @)
)

works when

@_req = $.ajax(
  url: app.api('suggest', place)
  success: _.bind(@renderSuggest, @)
  error: _.bind(@clearSuggest, @)
)

doesnt. Server headers are fine, getting unparsed string response from the server anyway.

Tried this as a workaround:

app.dom.doc.on('ajaxBeforeSend', (e, xhr, options)->
  options.dataType = 'json' unless options.dataType
)

Doesnt work either. options already have dataType == 'json'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0