hello In the past I've fired AJAX call to a WCF endpoint configured to use "webHttpBinding" as follows:
function SomeJavascriptFunc() { ... var myAjax = new Ajax.Request( url, { method: 'get', contentType: 'application/json', parameters: oParam, onComplete: showResponse, onFailure: function() { alert("call failed."); } } ); I digged deeper into "prototype.js", they used this to get a Ajax object: var Ajax = { getTransport: function() { return Try.these( function() { return new XMLHttpRequest()}, function() { return new ActiveXObject('Msxml2.XMLHTTP')}, function() { return new ActiveXObject('Microsoft.XMLHTTP')} ) || false; }, That's vanilla AJAX - now, my question is, with WCF endpoint configured "webHttpBinding" - do we *need* to set request content type to "application/json"? From doc, * application/ecmascript * application/javascript * application/x-ecmascript * application/x-javascript * text/ecmascript * text/javascript * text/x-ecmascript * text/x-javascript Say if I change my WCF endpoint to wsHttpBinding, should I change my content type accordingly? Thanks REF: http://www.prototypejs.org/api/ajax/request --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---