ajax - Why does my accept header keep getting changed from application/json to */* -


i'm trying send ajax request webapi service accept header of 'application/json'

when set break point in service, see accept header coming through "/". doesn't work out me because our code checks our "known" media types , rejects request if not found.

here ajax request in it's current state:

$.ajax({         url: requesturl,         type: 'get',         accept: {             json: 'application/json'         },         success: function(response, status, xhr) {             displayusers(response);         },         error: function(xhr, status, exception) {             alert(exception);         }     }); 

i've tried in ie, chrome, , firefox. same. using cors.

does response (or options response, in case of pre-flighted cors) contain access-control-allow-headers: accept allowing accept header when make cross-domain request? guess don't , browsers switch default behavior of sending */*.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -