Parcourir la source

Don't send Accept header

It doesn't actually matter whether we send this, so let's simplify.
Ryan McCue il y a 12 ans
Parent
commit
a344c30b17
1 fichiers modifiés avec 1 ajouts et 6 suppressions
  1. 1 6
      js/app.js

+ 1 - 6
js/app.js

@@ -301,12 +301,7 @@
     var $reference = $('#reference'), $list = $reference.find('ul'), $fields = $('.inputs > div').not('#reference');
     $reference.append($("<div><div></div></div>").addClass('throbber'));
 
-   $.ajax( {
-      url: config.api_url + "/",
-      beforeSend: function( xhr ) {
-          xhr.setRequestHeader( "Accept", "application/json" );
-        }
-      } ).done( function( response ) {
+   $.ajax( { url: config.api_url + "/" } ).done( function( response ) {
 
       $reference.find('.throbber').remove();
       $.each(response.routes, function(index){