JQuery POST request transforming into OPTIONS. Why?
This could happen if you violate the same origin policy restriction. The Access-Control-Request-Method
request header makes me think this is the case. I see that you specify a full address https://internal.company.com/data/displayUserList
in your post request. Make sure that the page hosting this script is originating from https://internal.company.com
as well. The best would be to use a relative address:
$.post('/data/displayUserList', { Email: "", Name: "%GEORGE%" }, function(responseText, textStatus) { console.log("Response:\n" + responseText + textStatus); });
if you are trying to call a different server in another domain then the strategy to overcome this should reside in the backend to make the server to allow calls from a different front-end domain and in that case you shouldn't break your head trying to adjust this in the front end.