I need to create a JSON
ajax request
from another domain. after I think I got over the cross domain issues, here is where I stuck:
I need to add my custom "myCustomHeader
" header - that's easy from a server
, but seems to be much more complicated from the client
...
We added them
$.ajax({
type: 'POST',
data: put the results of your header request here,
url: 'http://server.com/service',
beforeSend: function (xhr) {
xhr.setRequestHeader('myCustomHeader', '1')
},
success: function(data) {
alert('success.');
}
});
This generates a preflight
header with the headers I wanted, without the values
(CSV
), but they do not appear in the header of the request
itself (as myCustomHeader=X
)...