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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -