[wp-trac] [WordPress Trac] #31577: wp.ajax.send JS function should send ajax request with dataType json

WordPress Trac noreply at wordpress.org
Tue Mar 10 02:09:45 UTC 2015


#31577: wp.ajax.send JS function should send ajax request with dataType json
--------------------------+------------------------------
 Reporter:  TikiTDO       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+------------------------------

Comment (by nacin):

 I believe what needs to happen is `Content-type: application/json` needs
 to be returned, correct? If you are using the corresponding PHP API
 (`wp_send_json_success()/_error()`), then you should always have this
 content type set.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31577#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list